diff --git a/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901238/MainActivity.java b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901238/MainActivity.java new file mode 100644 index 00000000..ccc07744 --- /dev/null +++ b/app/src/main/java/edu/hzuapps/androidworks/homeworks/com1314080901238/MainActivity.java @@ -0,0 +1,33 @@ +package com.example.yaoyiyao; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + Button button1=(Button)findViewById(R.id.button); + Button button2=(Button)findViewById(R.id.button2); + button1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent i=new Intent(); + i.setClass(MainActivity.this,Shark.class); + startActivity(i); + } + }); + button2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + MainActivity.this.finish(); + } + }); + } + +} diff --git a/app/src/main/res/drawable-hdpi/ic_launcher.png b/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..288b6655 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/drawable-hdpi/me.png b/app/src/main/res/drawable-hdpi/me.png new file mode 100644 index 00000000..3ece9b7f Binary files /dev/null and b/app/src/main/res/drawable-hdpi/me.png differ diff --git a/app/src/main/res/drawable-hdpi/shake_bottom.png b/app/src/main/res/drawable-hdpi/shake_bottom.png new file mode 100644 index 00000000..54378a1f Binary files /dev/null and b/app/src/main/res/drawable-hdpi/shake_bottom.png differ diff --git a/app/src/main/res/drawable-hdpi/shake_bottom_line.png b/app/src/main/res/drawable-hdpi/shake_bottom_line.png new file mode 100644 index 00000000..dbbf8242 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/shake_bottom_line.png differ diff --git a/app/src/main/res/drawable-hdpi/shake_top.png b/app/src/main/res/drawable-hdpi/shake_top.png new file mode 100644 index 00000000..6edd3925 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/shake_top.png differ diff --git a/app/src/main/res/drawable-hdpi/shake_top_line.png b/app/src/main/res/drawable-hdpi/shake_top_line.png new file mode 100644 index 00000000..8e686874 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/shake_top_line.png differ diff --git a/app/src/main/res/layout/activity_main (2).xml b/app/src/main/res/layout/activity_main (2).xml new file mode 100644 index 00000000..d8b18ee1 --- /dev/null +++ b/app/src/main/res/layout/activity_main (2).xml @@ -0,0 +1,34 @@ + + + + +