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 #585 from qxadc/master
Browse files Browse the repository at this point in the history
#2 #329 第二次实验
  • Loading branch information
zengsn authored Oct 14, 2020
2 parents 86c7151 + 675bdad commit 3d42e2e
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
23 changes: 23 additions & 0 deletions students/sec1814080911130/app/src/main/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">

<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=".OptionsActivity"></activity>
<activity android:name=".PlayActivity" />
<activity android:name=".Sec1814080911130Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

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

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class OptionsActivity extends AppCompatActivity {

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

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class PlayActivity extends AppCompatActivity {

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

import androidx.appcompat.app.AppCompatActivity;

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

public class Sec1814080911130Activity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sec1814080911130);

final Sec1814080911130Activity thisActivity = this;
Button BtnStart = (Button) findViewById(R.id.button_start);
BtnStart.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(thisActivity,PlayActivity.class);
thisActivity.startActivity(intent);
}
});
Button BtnOptions = (Button) findViewById(R.id.button_options);
BtnOptions.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(thisActivity,OptionsActivity.class);
thisActivity.startActivity(intent);
}
});
}
}

0 comments on commit 3d42e2e

Please sign in to comment.