forked from hzuapps/android-labs-2018
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
197 additions
and
9 deletions.
There are no files selected for viewing
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
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
83 changes: 83 additions & 0 deletions
83
...80902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_02.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,83 @@ | ||
package edu.hzuapps.androidlabs.soft1614080902422; | ||
|
||
import android.content.Intent; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
public class Soft1614080902422Activity_02 extends AppCompatActivity implements View.OnClickListener { | ||
public Intent i1; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_soft1614080902422_02); | ||
Button bt1 = (Button) findViewById(R.id.m_1); | ||
Button bt2 = (Button) findViewById(R.id.m_2); | ||
Button bt3 = (Button) findViewById(R.id.m_3); | ||
Button bt4 = (Button) findViewById(R.id.m_4); | ||
Button bt5 = (Button) findViewById(R.id.m_5); | ||
Button bt6 = (Button) findViewById(R.id.m_6); | ||
Button bt7 = (Button) findViewById(R.id.m_7); | ||
Button bt8 = (Button) findViewById(R.id.m_8); | ||
Button bt9 = (Button) findViewById(R.id.m_9); | ||
Button bt10 = (Button) findViewById(R.id.m_10); | ||
bt1.setOnClickListener(this); | ||
bt2.setOnClickListener(this); | ||
bt3.setOnClickListener(this); | ||
bt4.setOnClickListener(this); | ||
bt5.setOnClickListener(this); | ||
bt6.setOnClickListener(this); | ||
bt7.setOnClickListener(this); | ||
bt8.setOnClickListener(this); | ||
bt9.setOnClickListener(this); | ||
bt10.setOnClickListener(this); | ||
} | ||
|
||
@Override | ||
public void onClick(View v) { | ||
switch (v.getId()) { | ||
case R.id.m_1: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_2: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_3: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_4: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_5: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_6: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_7: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_8: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_9: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
break; | ||
case R.id.m_10: | ||
i1 = new Intent(this, Soft1614080902422Activity.class); | ||
startActivity(i1); | ||
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
86 changes: 86 additions & 0 deletions
86
Soft1614080902422/res/layout/activity_soft1614080902422_02.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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout 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" | ||
tools:context=".Soft1614080902422Activity_02"> | ||
|
||
<LinearLayout | ||
android:layout_width="344dp" | ||
android:layout_height="495dp" | ||
android:orientation="vertical" | ||
tools:layout_editor_absoluteX="8dp" | ||
tools:layout_editor_absoluteY="8dp"> | ||
|
||
<Button | ||
android:id="@+id/m_1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="红颜旧-刘涛" /> | ||
|
||
<Button | ||
android:id="@+id/m_2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="小幸运-田馥甄" /> | ||
|
||
<Button | ||
android:id="@+id/m_3" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="喜欢你-邓紫棋" /> | ||
|
||
<Button | ||
android:id="@+id/m_4" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="童话镇-陈一发儿" /> | ||
|
||
<Button | ||
android:id="@+id/m_5" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="遇见-孙燕姿" /> | ||
|
||
<Button | ||
android:id="@+id/m_6" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="trouble is a friend-lenka" /> | ||
|
||
<Button | ||
android:id="@+id/m_7" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="暗香-沙宝亮" /> | ||
|
||
<Button | ||
android:id="@+id/m_8" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="Button" /> | ||
|
||
<Button | ||
android:id="@+id/m_9" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="告白气球-周杰伦" /> | ||
|
||
<Button | ||
android:id="@+id/m_10" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:text="有点甜-汪苏泷" /> | ||
</LinearLayout> | ||
</android.support.constraint.ConstraintLayout> |