diff --git a/build.gradle.kts b/build.gradle.kts index d033318..cc6408b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,6 +34,7 @@ dependencies { implementation(libs.material) implementation(libs.activity) implementation(libs.constraintlayout) + implementation(libs.gridlayout) testImplementation(libs.junit) androidTestImplementation(libs.ext.junit) androidTestImplementation(libs.espresso.core) diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 67039c4..02a908d 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -12,6 +12,9 @@ android:supportsRtl="true" android:theme="@style/Theme.MyProject" tools:targetApi="31"> + diff --git a/src/main/java/com/hnucm/c202201020328/Date_dayActivity.java b/src/main/java/com/hnucm/c202201020328/Date_dayActivity.java new file mode 100644 index 0000000..6d936e5 --- /dev/null +++ b/src/main/java/com/hnucm/c202201020328/Date_dayActivity.java @@ -0,0 +1,24 @@ +package com.hnucm.c202201020328; + +import android.os.Bundle; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +public class Date_dayActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_date_day); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + } +} \ No newline at end of file diff --git a/src/main/java/com/hnucm/c202201020328/ToolActivity.java b/src/main/java/com/hnucm/c202201020328/ToolActivity.java index ab7e1f6..e021fe5 100644 --- a/src/main/java/com/hnucm/c202201020328/ToolActivity.java +++ b/src/main/java/com/hnucm/c202201020328/ToolActivity.java @@ -1,9 +1,12 @@ package com.hnucm.c202201020328; +import android.content.Intent; import android.os.Bundle; +import android.view.View; import androidx.activity.EdgeToEdge; import androidx.appcompat.app.AppCompatActivity; +import androidx.constraintlayout.widget.ConstraintLayout; import androidx.core.graphics.Insets; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; @@ -17,5 +20,13 @@ public class ToolActivity extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tool); ImmersionBar.with(this).init(); + ConstraintLayout constraintLayout=findViewById(R.id.main); + constraintLayout.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent=new Intent(ToolActivity.this, Date_dayActivity.class); + startActivity(intent); + } + }); } } \ No newline at end of file diff --git a/src/main/res/drawable/n.png b/src/main/res/drawable/n.png new file mode 100644 index 0000000..50869ea Binary files /dev/null and b/src/main/res/drawable/n.png differ diff --git a/src/main/res/layout/activity_date_day.xml b/src/main/res/layout/activity_date_day.xml new file mode 100644 index 0000000..372240e --- /dev/null +++ b/src/main/res/layout/activity_date_day.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/main/res/layout/activity_tool.xml b/src/main/res/layout/activity_tool.xml index 1d67144..6862124 100644 --- a/src/main/res/layout/activity_tool.xml +++ b/src/main/res/layout/activity_tool.xml @@ -29,6 +29,7 @@ app:layout_constraintTop_toBottomOf="@+id/textView14" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file