mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
DroidFish: Swapped ok/cancel buttons in views for consistency with Android dialogs.
This commit is contained in:
parent
e8d1ef5dd6
commit
d945a2bc5e
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user