Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #406 from Chenweikang2/master
Browse files Browse the repository at this point in the history
#2 #10 第二次实验
  • Loading branch information
zengsn authored Oct 6, 2020
2 parents ec5a996 + 68589bc commit 4966ed4
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 8 deletions.
23 changes: 23 additions & 0 deletions students/net1806081301122/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.hzuapps.androidlabs.Net1806081301122activity.androidLabs">

<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=".HelpActivity"></activity>
<activity android:name=".SettingActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

</manifest>
26 changes: 26 additions & 0 deletions students/net1806081301122/HelpActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package edu.hzuapps.androidlabs.net1806081301122;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class HelpActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help);
Button button = findViewById(R.id.help);
final HelpActivity _this = this;
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(_this, HelpActivity.class);
_this.startActivity(intent);
}
});
}
}
31 changes: 23 additions & 8 deletions students/net1806081301122/Net1806081301122Activity.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
package edu.hzuapps.androidlabs.net1806081301122;

public class Net1806081301122Activity.java {
import androidx.appcompat.app.AppCompatActivity;

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

}
public class Net1806081301122Activity extends AppCompatActivity {

}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = findViewById(R.id.button);
final MainActivity _this = this;
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(_this, MainActivity.class);
_this.startActivity(intent);
}
});

}
}
26 changes: 26 additions & 0 deletions students/net1806081301122/SettingActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package edu.hzuapps.androidlabs.net1806081301122;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class SettingActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_setting);
Button button = findViewById(R.id.setting);
final SettingActivity _this = this;
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(_this, SettingActivity.class);
_this.startActivity(intent);
}
});
}
}

0 comments on commit 4966ed4

Please sign in to comment.