diff --git a/DroidFish/res/layout-land/editboard.xml b/DroidFish/res/layout-land/editboard.xml index 1cdbcb6..98346fb 100644 --- a/DroidFish/res/layout-land/editboard.xml +++ b/DroidFish/res/layout-land/editboard.xml @@ -26,21 +26,21 @@ android:id="@+id/LinearLayout02" android:layout_width="fill_parent" android:layout_height="wrap_content"> - - + + \ No newline at end of file diff --git a/DroidFish/res/layout/create_pgn_file.xml b/DroidFish/res/layout/create_pgn_file.xml index 0203c0f..7a58479 100644 --- a/DroidFish/res/layout/create_pgn_file.xml +++ b/DroidFish/res/layout/create_pgn_file.xml @@ -27,13 +27,6 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> - + diff --git a/DroidFish/res/layout/edit_comments.xml b/DroidFish/res/layout/edit_comments.xml index f3ed5aa..816d0db 100644 --- a/DroidFish/res/layout/edit_comments.xml +++ b/DroidFish/res/layout/edit_comments.xml @@ -85,13 +85,6 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> - - + + \ No newline at end of file diff --git a/DroidFish/res/layout/edit_headers.xml b/DroidFish/res/layout/edit_headers.xml index 49fc2db..94226f6 100644 --- a/DroidFish/res/layout/edit_headers.xml +++ b/DroidFish/res/layout/edit_headers.xml @@ -105,13 +105,6 @@ android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> - - + + diff --git a/DroidFish/res/layout/editboard.xml b/DroidFish/res/layout/editboard.xml index 16eca88..f83d773 100644 --- a/DroidFish/res/layout/editboard.xml +++ b/DroidFish/res/layout/editboard.xml @@ -22,19 +22,19 @@ android:id="@+id/LinearLayout02" android:layout_width="fill_parent" android:layout_height="wrap_content"> - - + + diff --git a/DroidFish/src/org/petero/droidfish/ChessBoard.java b/DroidFish/src/org/petero/droidfish/ChessBoard.java index 759f195..79460ed 100644 --- a/DroidFish/src/org/petero/droidfish/ChessBoard.java +++ b/DroidFish/src/org/petero/droidfish/ChessBoard.java @@ -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();