-
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 #1047 from wufengtao/master
- Loading branch information
Showing
9 changed files
with
325 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
students/soft1714080902402/app04/src/main/AndroidManifest.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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="edu.hzuapps.androidlabs.forthapplication"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name=".soft1714080902402Activity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
22 changes: 22 additions & 0 deletions
22
...080902402/app04/src/main/java/edu/hzuapps/androidlabs/soft1714080902402/MainActivity.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,22 @@ | ||
package edu.hzuapps.androidlabs.forthapplication; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Toast; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
} | ||
|
||
|
||
public void playButtonClick(View view){ | ||
Toast.makeText(MainActivity.this,"游戏马上开始,正在加载...",Toast.LENGTH_SHORT).show(); | ||
Toast.makeText(MainActivity.this,"游戏开始",Toast.LENGTH_LONG).show(); | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...04/src/main/java/edu/hzuapps/androidlabs/soft1714080902402/soft1714080902402Activity.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,21 @@ | ||
package edu.hzuapps.androidlabs.forthapplication; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
|
||
public class soft1714080902402Activity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_soft1714080902402); | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
} |
22 changes: 22 additions & 0 deletions
22
students/soft1714080902402/app04/src/main/res/drawable/border.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,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
|
||
<corners android:radius="5dp"/> | ||
|
||
<solid android:color="#dddddd"/> | ||
|
||
<stroke android:color="#303030" | ||
android:width="1dp"/> | ||
|
||
<padding android:bottom="10dp" | ||
android:top="10dp" | ||
android:left="10dp" | ||
android:right="10dp"/> | ||
|
||
<gradient | ||
android:centerColor="#bbbbbb" | ||
android:endColor="#dddddd" | ||
android:startColor="#aaaaaa"/> | ||
|
||
</selector> |
25 changes: 25 additions & 0 deletions
25
students/soft1714080902402/app04/src/main/res/layout/activity_main.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,25 @@ | ||
<?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=".MainActivity"> | ||
|
||
|
||
<ImageButton | ||
android:id="@+id/imageButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:background="#0000" | ||
android:onClick="playButtonClick" | ||
android:paddingTop="80dp" | ||
android:src="@mipmap/timg01" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:ignore="MissingConstraints" /> | ||
|
||
|
||
</android.support.constraint.ConstraintLayout> |
181 changes: 181 additions & 0 deletions
181
students/soft1714080902402/app04/src/main/res/layout/activity_soft1714080902402.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,181 @@ | ||
<?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=".soft1714080902402Activity"> | ||
|
||
|
||
<!-- | ||
<EditText | ||
android:id="@+id/editText2" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
android:layout_marginTop="205dp" | ||
android:layout_marginBottom="99dp" | ||
android:background="@drawable/border" | ||
android:editable="false" | ||
android:gravity="right|center_vertical" | ||
android:padding="10dp" | ||
android:text="0123456789" | ||
android:textColor="#0000ff" | ||
android:textSize="30sp" | ||
app:layout_constraintBottom_toTopOf="@+id/gridLayout2" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:ignore="MissingConstraints" /> | ||
--> | ||
|
||
<GridLayout | ||
android:id="@+id/gridLayout2" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="79dp" | ||
android:columnCount="5" | ||
android:orientation="horizontal" | ||
android:rowCount="6" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/editText3" | ||
tools:ignore="MissingConstraints"> | ||
|
||
<Button | ||
android:id="@+id/button1" | ||
android:text="MC" /> | ||
|
||
<Button | ||
android:id="@+id/button2" | ||
android:text="MR" /> | ||
|
||
<Button | ||
android:id="@+id/button3" | ||
android:text="MS" /> | ||
|
||
<Button | ||
android:id="@+id/button4" | ||
android:text="M+" /> | ||
|
||
<Button | ||
android:id="@+id/button5" | ||
android:layout_gravity="fill" | ||
android:text="M-" /> | ||
|
||
<Button | ||
android:id="@+id/button6" | ||
android:text="←" /> | ||
|
||
<Button | ||
android:id="@+id/button7" | ||
android:text="CE" /> | ||
|
||
<Button | ||
android:id="@+id/button8" | ||
android:text="C" /> | ||
|
||
<Button | ||
android:id="@+id/button9" | ||
android:text="±" /> | ||
|
||
<Button | ||
android:id="@+id/button10" | ||
android:layout_gravity="fill" | ||
android:text="√" /> | ||
|
||
<Button | ||
android:id="@+id/button11" | ||
android:text="7" /> | ||
|
||
<Button | ||
android:id="@+id/button12" | ||
android:text="8" /> | ||
|
||
<Button | ||
android:id="@+id/button13" | ||
android:text="9" /> | ||
|
||
<Button | ||
android:id="@+id/button14" | ||
android:text="/" /> | ||
|
||
<Button | ||
android:id="@+id/button15" | ||
android:layout_gravity="fill" | ||
android:text="%" /> | ||
|
||
<Button | ||
android:id="@+id/button16" | ||
android:text="4" /> | ||
|
||
<Button | ||
android:id="@+id/button17" | ||
android:text="5" /> | ||
|
||
<Button | ||
android:id="@+id/button18" | ||
android:layout_width="wrap_content" | ||
android:text="6" /> | ||
|
||
<Button | ||
android:id="@+id/button19" | ||
android:text="*" /> | ||
|
||
<Button | ||
android:id="@+id/button20" | ||
android:layout_gravity="fill" | ||
android:text="1/x" /> | ||
|
||
<Button | ||
android:id="@+id/button21" | ||
android:text="1" /> | ||
|
||
<Button | ||
android:id="@+id/button22" | ||
android:text="2" /> | ||
|
||
<Button | ||
android:id="@+id/button23" | ||
android:text="3" /> | ||
|
||
<Button | ||
android:id="@+id/button24" | ||
android:text="-" /> | ||
|
||
<Button | ||
android:id="@+id/button25" | ||
android:layout_rowSpan="2" | ||
android:layout_gravity="fill" | ||
android:text="=" /> | ||
|
||
<Button | ||
android:id="@+id/button26" | ||
android:layout_columnSpan="2" | ||
android:layout_gravity="fill" | ||
android:text="0" /> | ||
|
||
<Button | ||
android:id="@+id/button27" | ||
android:text="." /> | ||
|
||
<Button | ||
android:id="@+id/button28" | ||
android:text="+" /> | ||
|
||
</GridLayout> | ||
|
||
<EditText | ||
android:id="@+id/editText3" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="184dp" | ||
android:layout_marginEnd="108dp" | ||
android:ems="10" | ||
android:inputType="numberSigned" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
|
||
</android.support.constraint.ConstraintLayout> |
6 changes: 6 additions & 0 deletions
6
students/soft1714080902402/app04/src/main/res/values/colors.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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#008577</color> | ||
<color name="colorPrimaryDark">#00574B</color> | ||
<color name="colorAccent">#D81B60</color> | ||
</resources> |
9 changes: 9 additions & 0 deletions
9
students/soft1714080902402/app04/src/main/res/values/strings.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,9 @@ | ||
<resources> | ||
<string name="app_name">ForthApplication</string> | ||
<string name="file_menu">文件</string> | ||
<string name="new_file">新建文件</string> | ||
<string name="open_file">打开文件</string> | ||
<string name="save_file">保存文件</string> | ||
<string name="exit">退出程序</string> | ||
|
||
</resources> |
11 changes: 11 additions & 0 deletions
11
students/soft1714080902402/app04/src/main/res/values/styles.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,11 @@ | ||
<resources> | ||
|
||
<!-- Base application theme. --> | ||
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> | ||
<!-- Customize your theme here. --> | ||
<item name="colorPrimary">@color/colorPrimary</item> | ||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
<item name="colorAccent">@color/colorAccent</item> | ||
</style> | ||
|
||
</resources> |