DroidFish: Swapped ok/cancel buttons in views for consistency with Android dialogs.

This commit is contained in:
Peter Osterlund 2011-11-27 01:52:17 +00:00
parent e8d1ef5dd6
commit d945a2bc5e
6 changed files with 46 additions and 41 deletions

View File

@ -26,21 +26,21 @@
android:id="@+id/LinearLayout02"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:text="Cancel"
android:id="@+id/eb_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
<Button
android:text="Ok"
android:id="@+id/eb_ok"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
</LinearLayout>
<Button
android:text="Cancel"
android:id="@+id/eb_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -27,13 +27,6 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/create_pgn_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel">
</Button>
<Button
android:id="@+id/create_pgn_ok"
android:layout_width="fill_parent"
@ -41,5 +34,12 @@
android:layout_weight="1"
android:text="Ok">
</Button>
<Button
android:id="@+id/create_pgn_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel">
</Button>
</LinearLayout>
</LinearLayout>

View File

@ -85,13 +85,6 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/ed_comments_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel">
</Button>
<Button
android:id="@+id/ed_comments_ok"
android:layout_width="fill_parent"
@ -99,7 +92,14 @@
android:layout_weight="1"
android:text="Ok">
</Button>
</LinearLayout>
<Button
android:id="@+id/ed_comments_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel">
</Button>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -105,13 +105,6 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/ed_header_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel">
</Button>
<Button
android:id="@+id/ed_header_ok"
android:layout_width="fill_parent"
@ -119,7 +112,14 @@
android:layout_weight="1"
android:text="Ok">
</Button>
</LinearLayout>
<Button
android:id="@+id/ed_header_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Cancel">
</Button>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -22,19 +22,19 @@
android:id="@+id/LinearLayout02"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:text="Cancel"
android:id="@+id/eb_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
<Button
android:text="Ok"
android:id="@+id/eb_ok"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
</LinearLayout>
<Button
android:text="Cancel"
android:id="@+id/eb_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>
</LinearLayout>
</LinearLayout>

View File

@ -102,6 +102,9 @@ public class ChessBoard extends View {
moveMarkPaint.add(p);
}
if (isInEditMode())
return;
Typeface chessFont = Typeface.createFromAsset(getContext().getAssets(), "ChessCases.ttf");
whitePiecePaint.setTypeface(chessFont);
blackPiecePaint.setTypeface(chessFont);
@ -353,6 +356,8 @@ public class ChessBoard extends View {
@Override
protected void onDraw(Canvas canvas) {
if (isInEditMode())
return;
// long t0 = System.currentTimeMillis();
boolean animActive = anim.updateState();
final int width = getWidth();