Skip to content

Commit

Permalink
hzuapps#3 实验三
Browse files Browse the repository at this point in the history
  • Loading branch information
name committed Apr 22, 2018
1 parent 42f1c62 commit ff0a637
Show file tree
Hide file tree
Showing 19 changed files with 207 additions and 45 deletions.
11 changes: 7 additions & 4 deletions soft1614080902341/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lly.myapplication">
package="androidlabs.hzuapps.edu.soft1614080902341">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="剪刀石头布"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".soft1614080902341Activity"
android:label="@string/app_name">
android:name=".soft1614080902341MainActivity"
android:label="剪刀石头布">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".jiandaoMainActivity" />
<activity android:name=".shitouMainActivity" />
<activity android:name=".buMainActivity"></activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package androidlabs.hzuapps.edu.soft1614080902341;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;

public class buMainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bu_main);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package androidlabs.hzuapps.edu.soft1614080902341;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;

public class jiandaoMainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jiandao_main2);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package androidlabs.hzuapps.edu.soft1614080902341;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;

public class shitouMainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shitou_main);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package androidlabs.hzuapps.edu.soft1614080902341;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

public class soft1614080902341MainActivity extends ActionBarActivity {
private Button myBtn_one;
private Button myBtn_tow;
private Button myBtn_thr;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_soft1614080902341_main);
myBtn_one =(Button) findViewById(R.id.but_one);
myBtn_tow =(Button) findViewById(R.id.but_tow);
myBtn_thr = (Button) findViewById(R.id.but_thr);
myBtn_one.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// 另一个Activity的完整名称 = edu.androidlabs.soft123456(包名).Soft123456Activity(类名)
Intent intent=new Intent();
intent.setClass(soft1614080902341MainActivity.this, jiandaoMainActivity.class); //设置跳转的Activity
soft1614080902341MainActivity.this.startActivity(intent);
}
});
myBtn_tow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// 另一个Activity的完整名称 = edu.androidlabs.soft123456(包名).Soft123456Activity(类名)
Intent intent=new Intent();
intent.setClass(soft1614080902341MainActivity.this, shitouMainActivity.class); //设置跳转的Activity
soft1614080902341MainActivity.this.startActivity(intent);
}
});
myBtn_thr.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// 另一个Activity的完整名称 = edu.androidlabs.soft123456(包名).Soft123456Activity(类名)
Intent intent=new Intent();
intent.setClass(soft1614080902341MainActivity.this, buMainActivity.class); //设置跳转的Activity
soft1614080902341MainActivity.this.startActivity(intent);
}
});

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_soft1614080902341_main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}

return super.onOptionsItemSelected(item);
}



}

This file was deleted.

Binary file added soft1614080902341/res/drawable/bu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902341/res/drawable/hz1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902341/res/drawable/jiandao.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902341/res/drawable/shitou.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.lly.myapplication.soft1614080902341Activity">

tools:context="androidlabs.hzuapps.edu.soft1614080902341.buMainActivity">
<TextView
android:id="@+id/textview_01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
android:drawableTop="@drawable/bu"
android:text="" />

</RelativeLayout>
18 changes: 18 additions & 0 deletions soft1614080902341/res/layout/activity_jiandao_main2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="androidlabs.hzuapps.edu.soft1614080902341.jiandaoMainActivity">
<TextView
android:id="@+id/textview_01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/jiandao"
android:text="剪刀" />

</RelativeLayout>
18 changes: 18 additions & 0 deletions soft1614080902341/res/layout/activity_shitou_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="androidlabs.hzuapps.edu.soft1614080902341.shitouMainActivity">
<TextView
android:id="@+id/textview_01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/shitou"
android:text="石头" />

</RelativeLayout>
41 changes: 41 additions & 0 deletions soft1614080902341/res/layout/activity_soft1614080902341_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="androidlabs.hzuapps.edu.soft1614080902341.soft1614080902341MainActivity">


<TextView
android:id="@+id/textview_01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/hz1"
android:text="剪刀石头布" />
<Button
android:id="@+id/but_one"
android:text="剪刀"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textview_01"/>
<Button
android:id="@+id/but_tow"
android:text="石头"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/but_one"/>
<Button
android:id="@+id/but_thr"
android:text=""
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/but_tow"/>



</RelativeLayout>
2 changes: 1 addition & 1 deletion soft1614080902341/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<string name="app_name">石头剪刀布</string>
<string name="剪刀石头布">soft1614080902341</string>
<string name="action_settings">Settings</string>
</resources>
Binary file added soft1614080902341/剪刀.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902341/剪刀石头布.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902341/布.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added soft1614080902341/石头.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ff0a637

Please sign in to comment.