diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 0c35292..e041ad5 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -12,6 +12,15 @@ android:supportsRtl="true" android:theme="@style/Theme.MyProject" tools:targetApi="31"> + + + diff --git a/src/main/java/com/hnucm/c202201020328/ChooseActivity.java b/src/main/java/com/hnucm/c202201020328/ChooseActivity.java new file mode 100644 index 0000000..64f07b8 --- /dev/null +++ b/src/main/java/com/hnucm/c202201020328/ChooseActivity.java @@ -0,0 +1,37 @@ +package com.hnucm.c202201020328; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.TextView; + +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 ChooseActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_choose); + TextView textView3=findViewById(R.id.textView3); + TextView textView4=findViewById(R.id.textView4); + textView3.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent=new Intent(ChooseActivity.this,CommunityActivity.class); + startActivity(intent); + } + }); + textView4.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent=new Intent(ChooseActivity.this,ToolActivity.class); + startActivity(intent); + } + }); + } +} \ No newline at end of file diff --git a/src/main/java/com/hnucm/c202201020328/CommunityActivity.java b/src/main/java/com/hnucm/c202201020328/CommunityActivity.java new file mode 100644 index 0000000..38e3804 --- /dev/null +++ b/src/main/java/com/hnucm/c202201020328/CommunityActivity.java @@ -0,0 +1,18 @@ +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 CommunityActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_community); + } +} \ No newline at end of file diff --git a/src/main/java/com/hnucm/c202201020328/MainActivity.java b/src/main/java/com/hnucm/c202201020328/MainActivity.java index ef7f1f4..c030aeb 100644 --- a/src/main/java/com/hnucm/c202201020328/MainActivity.java +++ b/src/main/java/com/hnucm/c202201020328/MainActivity.java @@ -1,6 +1,9 @@ package com.hnucm.c202201020328; +import android.content.Intent; import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; import androidx.activity.EdgeToEdge; import androidx.appcompat.app.AppCompatActivity; @@ -17,5 +20,13 @@ public class MainActivity extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImmersionBar.with(this).init(); + ImageView imageView2=findViewById(R.id.imageView2); + imageView2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent=new Intent(MainActivity.this,ChooseActivity.class); + startActivity(intent); + } + }); } } \ 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 new file mode 100644 index 0000000..8700125 --- /dev/null +++ b/src/main/java/com/hnucm/c202201020328/ToolActivity.java @@ -0,0 +1,18 @@ +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 ToolActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_tool); + } +} \ No newline at end of file diff --git a/src/main/res/drawable/img.png b/src/main/res/drawable/img.png new file mode 100644 index 0000000..fe0b696 Binary files /dev/null and b/src/main/res/drawable/img.png differ diff --git a/src/main/res/drawable/img_1.png b/src/main/res/drawable/img_1.png new file mode 100644 index 0000000..0f54a2a Binary files /dev/null and b/src/main/res/drawable/img_1.png differ diff --git a/src/main/res/drawable/text_shape.xml b/src/main/res/drawable/text_shape.xml new file mode 100644 index 0000000..036703c --- /dev/null +++ b/src/main/res/drawable/text_shape.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/src/main/res/layout/activity_choose.xml b/src/main/res/layout/activity_choose.xml new file mode 100644 index 0000000..ecbdf80 --- /dev/null +++ b/src/main/res/layout/activity_choose.xml @@ -0,0 +1,34 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/res/layout/activity_community.xml b/src/main/res/layout/activity_community.xml new file mode 100644 index 0000000..5c6d0ed --- /dev/null +++ b/src/main/res/layout/activity_community.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/main/res/layout/activity_main.xml b/src/main/res/layout/activity_main.xml index 787303a..0f323e2 100644 --- a/src/main/res/layout/activity_main.xml +++ b/src/main/res/layout/activity_main.xml @@ -10,6 +10,7 @@ + + + + + + \ No newline at end of file diff --git a/src/main/res/layout/activity_tool.xml b/src/main/res/layout/activity_tool.xml new file mode 100644 index 0000000..62aa62c --- /dev/null +++ b/src/main/res/layout/activity_tool.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file