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

@ -27,16 +27,16 @@
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:text="Ok"
android:id="@+id/eb_ok"
android:layout_width="fill_parent"
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:text="Cancel"
android:id="@+id/eb_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>

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,6 +92,13 @@
android:layout_weight="1"
android:text="Ok">
</Button>
<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>

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,6 +112,13 @@
android:layout_weight="1"
android:text="Ok">
</Button>
<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>

View File

@ -23,16 +23,16 @@
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:text="Ok"
android:id="@+id/eb_ok"
android:layout_width="fill_parent"
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:text="Cancel"
android:id="@+id/eb_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</Button>

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();