diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index adb1f49..40a9564 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -38,6 +38,12 @@ android:theme="@style/Theme.MyApplication" android:usesCleartextTraffic="true" tools:targetApi="31"> + + diff --git a/src/main/java/com/example/myapplication/Home1Fragment.java b/src/main/java/com/example/myapplication/Home1Fragment.java index 9d990da..905411f 100644 --- a/src/main/java/com/example/myapplication/Home1Fragment.java +++ b/src/main/java/com/example/myapplication/Home1Fragment.java @@ -23,6 +23,8 @@ public class Home1Fragment extends Fragment { // Inflate the layout for this fragment View view=inflater.inflate(R.layout.fragment_home1, container, false); ImageView imageView1=view.findViewById(R.id.xtuantuan); + ImageView imageView2=view.findViewById(R.id.doubao); + ImageView imageView3=view.findViewById(R.id.daily); String imgUrl1="http://106.53.194.250:30089/i/2024/06/20/6673bbd16062f.png"; Glide.with(this) .load(imgUrl1) @@ -35,6 +37,21 @@ public class Home1Fragment extends Fragment { } }); + imageView2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent3 =new Intent(getActivity(),MessageActivity3.class); + startActivity(intent3); + } + }); + imageView3.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent1 =new Intent(getActivity(),MessageActivity2.class); + startActivity(intent1); + } + }); + return view; diff --git a/src/main/java/com/example/myapplication/MessageActivity2.java b/src/main/java/com/example/myapplication/MessageActivity2.java new file mode 100644 index 0000000..bd1b523 --- /dev/null +++ b/src/main/java/com/example/myapplication/MessageActivity2.java @@ -0,0 +1,44 @@ +package com.example.myapplication; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; + +import com.bumptech.glide.Glide; + +public class MessageActivity2 extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_message2); + ImageView imageView17=findViewById(R.id.imageView17); + ImageView imageView18=findViewById(R.id.imageView18); + ImageView imageView19=findViewById(R.id.imageView19); + String imgUrl17="http://106.53.194.250:30089/i/2024/06/20/6674387c7ba8a.png"; + Glide.with(this) + .load(imgUrl17) + .into(imageView17); + String imgUrl18="http://106.53.194.250:30089/i/2024/06/20/6674387c79559.png"; + Glide.with(this) + .load(imgUrl18) + .into(imageView18); + String imgUrl19="http://106.53.194.250:30089/i/2024/06/20/6674387cf01b5.png"; + Glide.with(this) + .load(imgUrl19) + .into(imageView19); + + + ImageView imageView14=findViewById(R.id.imageView14); + imageView14.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent3 =new Intent(MessageActivity2.this,FirstActivity.class); + startActivity(intent3); + } + }); + } +} \ No newline at end of file diff --git a/src/main/java/com/example/myapplication/MessageActivity3.java b/src/main/java/com/example/myapplication/MessageActivity3.java new file mode 100644 index 0000000..00520e5 --- /dev/null +++ b/src/main/java/com/example/myapplication/MessageActivity3.java @@ -0,0 +1,44 @@ +package com.example.myapplication; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.ImageView; + +import com.bumptech.glide.Glide; + +public class MessageActivity3 extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_message3); + ImageView imageView17=findViewById(R.id.imageView17); + ImageView imageView18=findViewById(R.id.imageView18); + ImageView imageView19=findViewById(R.id.imageView19); + String imgUrl17="http://106.53.194.250:30089/i/2024/06/20/66743bde4dae7.png"; + Glide.with(this) + .load(imgUrl17) + .into(imageView17); + String imgUrl18="http://106.53.194.250:30089/i/2024/06/20/66743bdd05bda.png"; + Glide.with(this) + .load(imgUrl18) + .into(imageView18); + String imgUrl19="http://106.53.194.250:30089/i/2024/06/20/66743bdce0d9d.png"; + Glide.with(this) + .load(imgUrl19) + .into(imageView19); + + + ImageView imageView14=findViewById(R.id.imageView14); + imageView14.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent3 =new Intent(MessageActivity3.this,FirstActivity.class); + startActivity(intent3); + } + }); + } +} \ No newline at end of file diff --git a/src/main/res/drawable/m2.png b/src/main/res/drawable/m2.png new file mode 100644 index 0000000..8ee2f22 Binary files /dev/null and b/src/main/res/drawable/m2.png differ diff --git a/src/main/res/drawable/m3.png b/src/main/res/drawable/m3.png new file mode 100644 index 0000000..58c3627 Binary files /dev/null and b/src/main/res/drawable/m3.png differ diff --git a/src/main/res/layout/activity_message2.xml b/src/main/res/layout/activity_message2.xml new file mode 100644 index 0000000..f68ad51 --- /dev/null +++ b/src/main/res/layout/activity_message2.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/res/layout/activity_message3.xml b/src/main/res/layout/activity_message3.xml new file mode 100644 index 0000000..29c2a64 --- /dev/null +++ b/src/main/res/layout/activity_message3.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file