-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #976 from KasenBob/master
#4 第四次实验
- Loading branch information
Showing
11 changed files
with
345 additions
and
38 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...714080902216/edu/hzuapps/androidlabs/soft1714080902216/Soft1714080902216DataActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,39 @@ | ||
package edu.hzuapps.androidlabs.soft1714080902216; | ||
|
||
import android.content.Intent; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.ImageButton; | ||
|
||
public class Soft1714080902216DataActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_soft1714080902216_data); | ||
Button inputLogin=(Button) findViewById(R.id.inputLogin); | ||
Button Comeback=(Button) findViewById(R.id.Comeback); | ||
inputLogin.setOnClickListener(new Soft1714080902216DataActivity.MyButton()); | ||
Comeback.setOnClickListener(new Soft1714080902216DataActivity.MyButton()); | ||
} | ||
|
||
private class MyButton implements View.OnClickListener | ||
{ | ||
@Override | ||
public void onClick(View v) | ||
{ | ||
Intent intent; | ||
switch(v.getId()) | ||
{ | ||
case R.id.inputLogin: | ||
break; | ||
case R.id.Comeback: | ||
intent=new Intent(Soft1714080902216DataActivity.this,Soft1714080902216MainActivity.class); | ||
startActivity(intent); | ||
break; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 37 additions & 1 deletion
38
...4080902216/edu/hzuapps/androidlabs/soft1714080902216/Soft1714080902216RecordActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
package edu.hzuapps.androidlabs.soft1714080902216; | ||
|
||
public class Soft1714080902216RecordActivity { | ||
import android.content.Intent; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.ImageButton; | ||
|
||
import static edu.hzuapps.androidlabs.soft1714080902216.R.*; | ||
|
||
public class Soft1714080902216RecordActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_soft1714080902216_record); | ||
Button inputLogin = (Button) findViewById(R.id.inputLogin); | ||
Button Comeback = (Button) findViewById(R.id.Comeback); | ||
inputLogin.setOnClickListener(new Soft1714080902216RecordActivity.MyButton()); | ||
Comeback.setOnClickListener(new Soft1714080902216RecordActivity.MyButton()); | ||
} | ||
|
||
private class MyButton implements View.OnClickListener { | ||
@Override | ||
public void onClick(View v) { | ||
Intent intent; | ||
switch (v.getId()) { | ||
case R.id.inputLogin: | ||
break; | ||
case R.id.Comeback: | ||
intent = new Intent(Soft1714080902216RecordActivity.this, Soft1714080902216MainActivity.class); | ||
startActivity(intent); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
4 changes: 4 additions & 0 deletions
4
.../soft1714080902216/edu/hzuapps/androidlabs/soft1714080902216/Soft1714080902216Remind.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package edu.hzuapps.androidlabs.soft1714080902216; | ||
|
||
public class Soft1714080902216Remind { | ||
} |
30 changes: 30 additions & 0 deletions
30
...714080902216/edu/hzuapps/androidlabs/soft1714080902216/Soft1714080902216UserActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,43 @@ | ||
package edu.hzuapps.androidlabs.soft1714080902216; | ||
|
||
import android.content.Intent; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.ImageButton; | ||
|
||
public class Soft1714080902216UserActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_soft1714080902216_user); | ||
Button denglu=(Button) findViewById(R.id.denglu); | ||
Button zhuce= (Button) findViewById(R.id.zhuce); | ||
Button back=(Button) findViewById(R.id.back); | ||
denglu.setOnClickListener(new Soft1714080902216UserActivity.myButton()); | ||
zhuce.setOnClickListener(new Soft1714080902216UserActivity.myButton()); | ||
back.setOnClickListener(new Soft1714080902216UserActivity.myButton()); | ||
} | ||
|
||
private class myButton implements View.OnClickListener | ||
{ | ||
@Override | ||
public void onClick(View v) | ||
{ | ||
Intent intent; | ||
switch(v.getId()) | ||
{ | ||
case R.id.button1: | ||
break; | ||
case R.id.button2: | ||
break; | ||
case R.id.imageButton: | ||
intent=new Intent(Soft1714080902216UserActivity.this,Soft1714080902216MainActivity.class); | ||
startActivity(intent); | ||
break; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 65 additions & 2 deletions
67
students/soft1714080902216/layout/activity_soft1714080902216_data.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,72 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@drawable/b5" | ||
tools:context=".Soft1714080902216DataActivity"> | ||
|
||
</android.support.constraint.ConstraintLayout> | ||
<TextView | ||
android:id="@+id/Tellname" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_x="0dp" | ||
android:layout_y="96dp" | ||
android:text="请输入姓名:" | ||
android:textColor="#000000" | ||
android:textSize="20sp" /> | ||
|
||
<EditText | ||
android:id="@+id/Inputname_name" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_x="0dp" | ||
android:layout_y="124dp" | ||
android:hint="Name" | ||
android:maxLines="1" /> | ||
|
||
<TextView | ||
android:id="@+id/Telldata" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_x="0dp" | ||
android:layout_y="274dp" | ||
android:text="生日为:" | ||
android:textColor="#000000" | ||
android:textSize="20sp" /> | ||
/> | ||
|
||
<EditText | ||
android:id="@+id/inputdata" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_x="0dp" | ||
android:layout_y="303dp" | ||
android:hint="birthday" | ||
android:maxLines="1" /> | ||
|
||
<Button | ||
android:id="@+id/inputLogin" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerHorizontal="true" | ||
android:layout_centerVertical="true" | ||
android:layout_x="118dp" | ||
android:layout_y="201dp" | ||
android:text="查询" | ||
android:textSize="30sp" /> | ||
|
||
<Button | ||
android:id="@+id/Comeback" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerHorizontal="true" | ||
android:layout_centerVertical="true" | ||
android:layout_x="122dp" | ||
android:layout_y="382dp" | ||
android:text="返回" | ||
android:textSize="30sp" | ||
android:onClick="back"/> | ||
|
||
</AbsoluteLayout> |
Oops, something went wrong.