diff --git a/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity.java b/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity.java
index 9c4456a2b..0ef0976df 100644
--- a/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity.java
+++ b/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity.java
@@ -13,14 +13,27 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1614080902422);
Button bt1 = (Button) findViewById(R.id.b1);
+ Button bt2 = (Button) findViewById(R.id.b2);
+
bt1.setOnClickListener(this);
+ bt2.setOnClickListener(this);
}
+
+
+
@Override
public void onClick(View v) {
-
- Intent intent = new Intent(this,Soft1614080902422Activity_01.class);
- startActivity(intent);
+ switch (v.getId()){
+ case R.id.b1:
+ Intent i1 = new Intent(this,Soft1614080902422Activity_01.class);
+ startActivity(i1);
+ break;
+ case R.id.b2:
+ Intent i2 = new Intent(this,Soft1614080902422Activity_02.class);
+ startActivity(i2);
+ break;
+ }
}
}
diff --git a/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_01.java b/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_01.java
index 16b728f88..95e8cad8a 100644
--- a/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_01.java
+++ b/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_01.java
@@ -9,15 +9,19 @@
-public class Soft1614080902422Activity_01 extends AppCompatActivity {
+public class Soft1614080902422Activity_01 extends AppCompatActivity implements View.OnClickListener{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1614080902422_01);
-
-
+ View t1 = (View) findViewById(R.id.textview_02);
+ t1.setOnClickListener(this);
}
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent(this,Soft1614080902422Activity.class);
+ startActivity(intent);
}
-
+}
\ No newline at end of file
diff --git a/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_02.java b/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_02.java
new file mode 100644
index 000000000..5a9b50197
--- /dev/null
+++ b/Soft1614080902422/java/edu/hzuapps/androidlabs/soft1614080902422/Soft1614080902422Activity_02.java
@@ -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;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Soft1614080902422/manifests/AndroidManifest.xml b/Soft1614080902422/manifests/AndroidManifest.xml
index 6b5e5a0f0..09b81dd68 100644
--- a/Soft1614080902422/manifests/AndroidManifest.xml
+++ b/Soft1614080902422/manifests/AndroidManifest.xml
@@ -2,6 +2,8 @@
+
+
-
-
+
+
\ No newline at end of file
diff --git a/Soft1614080902422/res/layout/activity_soft1614080902422_02.xml b/Soft1614080902422/res/layout/activity_soft1614080902422_02.xml
new file mode 100644
index 000000000..a58a874e2
--- /dev/null
+++ b/Soft1614080902422/res/layout/activity_soft1614080902422_02.xml
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file