Skip to content

Commit

Permalink
changes for: onClick buttons, records Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
borichellow committed Feb 6, 2015
1 parent 50bb53a commit ee82240
Show file tree
Hide file tree
Showing 60 changed files with 164 additions and 120 deletions.
Binary file modified bin/SpeedTrain.apk
Binary file not shown.
Binary file modified bin/classes.dex
Binary file not shown.
Binary file modified bin/classes/com/example/speedtrain/Game$1.class
Binary file not shown.
Binary file modified bin/classes/com/example/speedtrain/Game.class
Binary file not shown.
Binary file modified bin/classes/com/example/speedtrain/MainMenu.class
Binary file not shown.
Binary file modified bin/classes/com/example/speedtrain/R$id.class
Binary file not shown.
Binary file modified bin/classes/com/example/speedtrain/Records.class
Binary file not shown.
Binary file added bin/res/crunch/drawable/button.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 bin/res/crunch/drawable/buttonclicked.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 bin/res/crunch/drawable/combo.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 bin/res/crunch/drawable/ds.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 bin/res/crunch/drawable/fail.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 bin/res/crunch/drawable/h.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 bin/res/crunch/drawable/header_game.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 bin/res/crunch/drawable/main_menu.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 bin/res/crunch/drawable/manual1.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 bin/res/crunch/drawable/manual2.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 bin/res/crunch/drawable/menu.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 bin/res/crunch/drawable/menu_clicked.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 bin/res/crunch/drawable/o.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 bin/res/crunch/drawable/pause.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 bin/res/crunch/drawable/r.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 bin/res/crunch/drawable/records_title.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 bin/res/crunch/drawable/success.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 bin/res/crunch/drawable/text.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 bin/res/crunch/drawable/textclicked.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 bin/res/crunch/drawable/x.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 modified bin/resources.ap_
Binary file not shown.
20 changes: 10 additions & 10 deletions gen/com/example/speedtrain/R.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,32 @@ public static final class drawable {
}
public static final class id {
public static final int action_settings=0x7f090029;
public static final int btnBack=0x7f090021;
public static final int btnBack=0x7f090020;
public static final int btnNo=0x7f090005;
public static final int btnStart=0x7f09000f;
public static final int btnYes=0x7f090006;
public static final int buttonNext=0x7f090020;
public static final int buttonPrev=0x7f09001f;
public static final int buttonNext=0x7f09001f;
public static final int buttonPrev=0x7f09001e;
public static final int cart=0x7f090004;
public static final int combo=0x7f090009;
public static final int end=0x7f090014;
public static final int endButtons=0x7f090018;
public static final int fail=0x7f09000b;
public static final int game=0x7f090000;
public static final int imageManual=0x7f09001e;
public static final int imageManual=0x7f09001d;
public static final int imageView0=0x7f09000a;
public static final int imageView1=0x7f090008;
public static final int imageView2=0x7f09000c;
public static final int pause=0x7f090010;
public static final int quit=0x7f09001d;
public static final int records=0x7f09001c;
public static final int quit=0x7f09001c;
public static final int recordFields=0x7f090021;
public static final int records=0x7f09001b;
public static final int shadow=0x7f09000d;
public static final int start=0x7f09000e;
public static final int success=0x7f090007;
public static final int textEnd1=0x7f090015;
public static final int textEnd2=0x7f090016;
public static final int textEnd3=0x7f090017;
public static final int textFinish=0x7f090019;
public static final int textFinish=0x7f090018;
public static final int textPause=0x7f090001;
public static final int textQuit=0x7f090013;
public static final int textRecord1=0x7f090022;
Expand All @@ -90,11 +90,11 @@ public static final class id {
public static final int textRecord6=0x7f090027;
public static final int textRecord7=0x7f090028;
public static final int textRestart=0x7f090012;
public static final int textRestart2=0x7f09001a;
public static final int textRestart2=0x7f090019;
public static final int textResume=0x7f090011;
public static final int textScore=0x7f090003;
public static final int textTime=0x7f090002;
public static final int train=0x7f09001b;
public static final int train=0x7f09001a;
}
public static final class layout {
public static final int game=0x7f030000;
Expand Down
4 changes: 2 additions & 2 deletions res/anim/scale.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:toXScale = "1.5"
android:toYScale = "1.5"
android:toXScale = "1"
android:toYScale = "1"
android:pivotX="25"
android:pivotY="25"
android:duration="200">
Expand Down
4 changes: 2 additions & 2 deletions res/anim/scale_combo.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:toXScale = "1.5"
android:toYScale = "1.5"
android:toXScale = "1"
android:toYScale = "1"
android:pivotX="100"
android:pivotY="25"
android:duration="250">
Expand Down
Binary file added res/drawable/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions res/drawable/button_grey_big.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/buttonclicked"
android:state_pressed="true" />
<item android:drawable="@drawable/button" />
</selector>
6 changes: 6 additions & 0 deletions res/drawable/button_grey_small.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/textclicked"
android:state_pressed="true" />
<item android:drawable="@drawable/text" />
</selector>
6 changes: 6 additions & 0 deletions res/drawable/button_yellow_small.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@drawable/menu_clicked"
android:state_pressed="true" />
<item android:drawable="@drawable/menu" />
</selector>
Binary file added res/drawable/buttonclicked.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 res/drawable/combo.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 res/drawable/ds.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 res/drawable/fail.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 res/drawable/h.png
Binary file added res/drawable/header_game.png
Binary file added res/drawable/main_menu.png
Binary file added res/drawable/manual1.png
Binary file added res/drawable/manual2.png
Binary file added res/drawable/menu.png
Binary file added res/drawable/menu_clicked.png
Binary file added res/drawable/o.png
Binary file added res/drawable/pause.png
Binary file added res/drawable/r.png
Binary file added res/drawable/records_title.png
Binary file added res/drawable/success.png
Binary file added res/drawable/text.png
Binary file added res/drawable/textclicked.png
Binary file added res/drawable/x.png
199 changes: 118 additions & 81 deletions res/layout/game.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:src="@drawable/h" />
</LinearLayout>

Expand Down Expand Up @@ -157,124 +157,154 @@
<LinearLayout
android:id="@+id/start"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="10dp"
android:layout_height="fill_parent"
android:clickable="true"
android:orientation="vertical"
android:visibility="visible" >

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="11"
android:orientation="vertical" >
</LinearLayout>

<Button
android:id="@+id/btnStart"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="0dp"
android:layout_margin="10dp"
android:layout_weight="2"
android:background="@drawable/button_grey_big"
android:clickable="true"
android:text="Touch to star" />
</LinearLayout>

<LinearLayout
android:id="@+id/pause"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:clickable="false"
android:gravity="center|left|center_vertical"
android:orientation="vertical"
android:visibility="invisible" >

<Button
android:id="@+id/textResume"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/button_grey_small"
android:text="Resume" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical" >
</LinearLayout>

<Button
android:id="@+id/textRestart"
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/button_grey_small"
android:text="Restart" />
android:layout_weight="3"
android:orientation="vertical" >

<Button
android:id="@+id/textQuit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/button_grey_small"
android:text="Quit" />
<Button
android:id="@+id/textResume"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:background="@drawable/button_grey_small"
android:text="Resume" />

<Button
android:id="@+id/textRestart"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:background="@drawable/button_grey_small"
android:text="Restart" />

<Button
android:id="@+id/textQuit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:background="@drawable/button_grey_small"
android:text="Quit" />
</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/end"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:clickable="false"
android:orientation="vertical"
android:visibility="invisible" >

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/button_grey_big"
android:clickable="false"
android:orientation="vertical"
android:visibility="visible" >

<TextView
android:id="@+id/textEnd1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:text="Weldone!"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff" />

<TextView
android:id="@+id/textEnd2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:text="Your score:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff" />

<TextView
android:id="@+id/textEnd3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:text=""
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff" />
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical" >
</LinearLayout>

<LinearLayout
android:id="@+id/endButtons"
android:layout_width="fill_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:layout_weight="3"
android:orientation="vertical">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/button"
android:clickable="false"
android:orientation="vertical"
android:visibility="visible" >

<TextView
android:id="@+id/textEnd1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:text="Weldone!"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff" />

<TextView
android:id="@+id/textEnd2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:text="Your score:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff" />

<TextView
android:id="@+id/textEnd3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:text=""
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff" />
</LinearLayout>

<Button
android:id="@+id/textFinish"
Expand All @@ -297,6 +327,13 @@
android:text="TryAgain"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>

</RelativeLayout>
11 changes: 7 additions & 4 deletions res/layout/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="5"
android:layout_marginTop="40dp"
android:background="#e9cb85"
Expand All @@ -37,7 +37,8 @@
<Button
android:id="@+id/train"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp"
android:background="@drawable/button_yellow_small"
Expand All @@ -50,7 +51,8 @@
<Button
android:id="@+id/records"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp"
android:background="@drawable/button_yellow_small"
Expand All @@ -63,7 +65,8 @@
<Button
android:id="@+id/quit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp"
android:background="@drawable/button_yellow_small"
Expand Down
Loading

0 comments on commit ee82240

Please sign in to comment.