Commits

a761007  committed 7ad28c4

modify ui color.

  • Participants
  • Parent commits 521f054

Comments (0)

Files changed (2)

File res/layout/main.xml

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    >
+    android:layout_height="fill_parent" android:background="#EEEEEE">
 <TextView  
     android:layout_width="fill_parent" 
-    android:text="@string/player1" android:layout_gravity="center_horizontal" android:layout_height="20px"/>
+    android:text="@string/player1" android:layout_gravity="center_horizontal" android:layout_height="20px" android:background="#ffff00" android:textColor="#000000"/>
 
 <EditText android:layout_width="fill_parent" android:id="@+id/EditTextPlayer1" android:hint="請輸入玩家1名稱" android:layout_gravity="center_horizontal" android:layout_height="50px" android:singleLine="true"></EditText>
-<TextView android:layout_width="fill_parent" android:text="@string/player2" android:layout_gravity="center_horizontal" android:layout_height="20px"></TextView>
+<TextView android:layout_width="fill_parent" android:text="@string/player2" android:layout_gravity="center_horizontal" android:layout_height="20px" android:background="#00ffff" android:textColor="#000000"></TextView>
 <EditText android:layout_width="fill_parent" android:id="@+id/EditTextPlayer2" android:hint="請輸入玩家2名稱" android:layout_gravity="center_horizontal" android:layout_height="50px" android:singleLine="true"></EditText>
 
-<Button android:id="@+id/Button" android:text="@string/start" android:layout_width="fill_parent" android:layout_height="50px"></Button><LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content"><TextView android:layout_height="100px" android:layout_width="160px" android:id="@+id/TextViewPlayer1Status"></TextView>
-<TextView android:layout_width="160px" android:layout_height="100px" android:id="@+id/TextViewPlayer2Status"></TextView>
-</LinearLayout><TextView android:layout_width="fill_parent" android:layout_weight="8" android:id="@+id/TextViewResult" android:scrollbars="vertical" android:layout_height="290px" android:scrollHorizontally="true"></TextView>
+<Button android:id="@+id/Button" android:text="@string/start" android:layout_width="fill_parent" android:layout_height="50px"></Button><LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content"><TextView android:layout_height="100px" android:layout_width="160px" android:id="@+id/TextViewPlayer1Status" android:textColor="#000000" android:background="#ff0000"></TextView>
+<TextView android:layout_width="160px" android:layout_height="100px" android:id="@+id/TextViewPlayer2Status" android:background="#0fff0f" android:textColor="#000000"></TextView>
+</LinearLayout><TextView android:layout_width="fill_parent" android:layout_weight="8" android:id="@+id/TextViewResult" android:scrollbars="vertical" android:layout_height="290px" android:scrollHorizontally="true" android:background="#f0f0f0" android:textColor="#000000"></TextView>
 
 
 </LinearLayout>

File src/demo/tbsg/TBSG.java

     }
     
     private void initialize() {
+    	turn = 0;
     	editTextPlayer1 = (EditText) findViewById(R.id.EditTextPlayer1);
     	editTextPlayer2 = (EditText) findViewById(R.id.EditTextPlayer2);
-    	
     	textViewPlayer1Status = 
     		(TextView) findViewById(R.id.TextViewPlayer1Status);
     	textViewPlayer2Status = 
     		(TextView) findViewById(R.id.TextViewPlayer2Status);
     	textViewResult = (TextView) findViewById(R.id.TextViewResult);
-    	turn = 0;
     	button = (Button) findViewById(R.id.Button);
     	button.setOnClickListener(new View.OnClickListener() {