Skip to content

Commit

Permalink
hzuapps#1 hzuapps#420 第二次实验
Browse files Browse the repository at this point in the history
  • Loading branch information
BBsan13 committed Oct 10, 2020
1 parent bdf4de6 commit c4a7292
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 0 deletions.
43 changes: 43 additions & 0 deletions students/net1814080903139/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.hzuapps.androids">

<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=".TimeActivity"
android:parentActivityName=".Net1814080903139Activity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Net1814080903139Activity"></meta-data>
</activity>
<activity
android:name=".AlarmActivity"
android:parentActivityName=".Net1814080903139Activity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Net1814080903139Activity"></meta-data>
</activity>
<activity
android:name=".TimerActivity"
android:parentActivityName=".Net1814080903139Activity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Net1814080903139Activity"></meta-data>
</activity>
<activity
android:name=".StopWatchActivity"
android:parentActivityName=".Net1814080903139Activity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Net1814080903139Activity" />
</activity>

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package edu.hzuapps.androids;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class AlarmActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_alarm);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package edu.hzuapps.androids;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package edu.hzuapps.androids;


import androidx.appcompat.app.AppCompatActivity;

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

public class Net1814080903139Activity extends AppCompatActivity {
private Net1814080903139Activity myThis;
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_net1814080903139);
myThis=this;
Button alarmButton = findViewById(R.id.AlarmButton),
timerButton=findViewById(R.id.TimerButton),
timeButton = findViewById(R.id.TimeButton),
stopwatchButton=findViewById(R.id.StopWatchButton);
timeButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View view){
Intent timeIntent=new Intent(myThis,TimeActivity.class);
startActivity(timeIntent);
}
});
alarmButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View view){
Intent alarmIntent=new Intent(myThis,AlarmActivity.class);
startActivity(alarmIntent);
}
});
timerButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View view){
Intent timerIntent=new Intent(myThis,TimerActivity.class);
startActivity(timerIntent);
}
});
stopwatchButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View view){
Intent stopwatchIntent=new Intent(myThis,StopWatchActivity.class);
startActivity(stopwatchIntent);
}
});

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package edu.hzuapps.androids;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class StopWatchActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stopwatch);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package edu.hzuapps.androids;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class TimeActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_time);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package edu.hzuapps.androids;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class TimerActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_timer);
}
}

0 comments on commit c4a7292

Please sign in to comment.