Skip to content

Commit

Permalink
hzuapps#2 hzuapps#19 第2次实验
Browse files Browse the repository at this point in the history
  • Loading branch information
Playerlhh committed Oct 6, 2020
1 parent a77494f commit 7e0a193
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 5 deletions.
23 changes: 23 additions & 0 deletions students/net1814080903210/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.hzuapp.androidlabs.Net1814080903210">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".CommentActivity"></activity>
<activity android:name=".NewsInfoActivity"/>
<activity android:name=".Net1814080903210Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
14 changes: 14 additions & 0 deletions students/net1814080903210/Comment1814080903210Activity.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
28 changes: 23 additions & 5 deletions students/net1814080903210/Net1814080903210Activity.java
Original file line number Diff line number Diff line change
@@ -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;

}
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);
}
});
}
}
26 changes: 26 additions & 0 deletions students/net1814080903210/NewsInfo1814080903210Activity.java
Original file line number Diff line number Diff line change
@@ -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);
}
});
}
}

0 comments on commit 7e0a193

Please sign in to comment.