From 7e0a19301acffa24a852983eed8800c9fe0d2186 Mon Sep 17 00:00:00 2001 From: Playerlhh <1023122830@qq.com> Date: Tue, 6 Oct 2020 10:29:34 +0800 Subject: [PATCH] =?UTF-8?q?#2=20#19=20=E7=AC=AC2=E6=AC=A1=E5=AE=9E?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- students/net1814080903210/AndroidManifest.xml | 23 +++++++++++++++ .../Comment1814080903210Activity.java | 14 ++++++++++ .../Net1814080903210Activity.java | 28 +++++++++++++++---- .../NewsInfo1814080903210Activity.java | 26 +++++++++++++++++ 4 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 students/net1814080903210/AndroidManifest.xml create mode 100644 students/net1814080903210/Comment1814080903210Activity.java create mode 100644 students/net1814080903210/NewsInfo1814080903210Activity.java diff --git a/students/net1814080903210/AndroidManifest.xml b/students/net1814080903210/AndroidManifest.xml new file mode 100644 index 000000000..fe7fa6f31 --- /dev/null +++ b/students/net1814080903210/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/students/net1814080903210/Comment1814080903210Activity.java b/students/net1814080903210/Comment1814080903210Activity.java new file mode 100644 index 000000000..9da5bd25e --- /dev/null +++ b/students/net1814080903210/Comment1814080903210Activity.java @@ -0,0 +1,14 @@ +package edu.hzuapp.androidlabs.net1814080903210; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; + +public class Comment1814080903210Activity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_comment); + } +} diff --git a/students/net1814080903210/Net1814080903210Activity.java b/students/net1814080903210/Net1814080903210Activity.java index f0691e8d5..877696189 100644 --- a/students/net1814080903210/Net1814080903210Activity.java +++ b/students/net1814080903210/Net1814080903210Activity.java @@ -1,8 +1,26 @@ -public class Net1814080903210Activity{ +package edu.hzuapp.androidlabs.net1814080903210; - public static void main(String[] args) { - +import androidx.appcompat.app.AppCompatActivity; - } +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; -} \ No newline at end of file +public class Net1814080903210Activity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + Button button = findViewById(R.id.see); + final Net1814080903210Activity _this = this; + button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(_this, NewsInfo1814080903210Activity.class); + _this.startActivity(intent); + } + }); + } +} diff --git a/students/net1814080903210/NewsInfo1814080903210Activity.java b/students/net1814080903210/NewsInfo1814080903210Activity.java new file mode 100644 index 000000000..3da55d6f1 --- /dev/null +++ b/students/net1814080903210/NewsInfo1814080903210Activity.java @@ -0,0 +1,26 @@ +package edu.hzuapp.androidlabs.net1814080903210; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class NewsInfo1814080903210Activityextends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_info); + Button button = findViewById(R.id.button); + final NewsInfoActivity _this = this; + button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(_this, Comment1814080903210Activity.class); + _this.startActivity(intent); + } + }); + } +}