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

#2 #67 第二次实验 #411

Merged
merged 6 commits into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions students/net1814080903226/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,9 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".Net1814080903226MessageViewActivity"
android:label="@string/title_activity_net1814080903226_message_view"
android:theme="@style/AppTheme.NoActionBar"></activity>
<activity
android:name=".Net1814080903226MyViewActivity"
android:label="@string/title_activity_net1814080903226_my_view"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Net1814080903226MainviewActivity"
android:label="@string/title_activity_net1814080903226_mainview"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<activity android:name="edu.hzuapps.androidlabs.Net1814080903226MessageActivity"></activity>
<activity android:name="edu.hzuapps.androidlabs.Net1814080903226MyViewActivity" />
<activity android:name="edu.hzuapps.androidlabs.Net1814080903226MainViewActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
37 changes: 35 additions & 2 deletions students/net1814080903226/Net1814080903226Activity.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
package edu.hzuapps.androidlabs.net1814080903226
public class Net1814080903226Activity{
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 Net1814080903226MainViewActivity extends AppCompatActivity {

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

final Net1814080903226MainViewActivity thisActivity = this;
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(thisActivity,Net1814080903226MyViewActivity.class);
thisActivity.startActivity(intent);
}
});

Button button2 = (Button) findViewById(R.id.button2);
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(thisActivity,Net1814080903226MessageActivity.class);
thisActivity.startActivity(intent);
}
});

}
}
31 changes: 0 additions & 31 deletions students/net1814080903226/Net1814080903226MainviewActivity.java

This file was deleted.

14 changes: 14 additions & 0 deletions students/net1814080903226/Net1814080903226MessageActivity.java
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 Net1814080903226MessageActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.net_1814080903226_message_activity);
}
}
31 changes: 0 additions & 31 deletions students/net1814080903226/Net1814080903226MessageViewActivity.java

This file was deleted.

21 changes: 2 additions & 19 deletions students/net1814080903226/Net1814080903226MyViewActivity.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
package edu.hzuapps.androidlabs;

import android.os.Bundle;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.view.View;
import android.os.Bundle;

public class Net1814080903226MyViewActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_net1814080903226_my_view);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
setContentView(R.layout.net_1814080903226_myview_activity);
}
}
Binary file removed students/net1814080903226/实验一.docx
Binary file not shown.