DroidFish: In edit board portrait mode, use only a single title bar line.

This commit is contained in:
Peter Osterlund 2012-09-29 23:28:30 +00:00
parent 9858697da2
commit c43d652207
3 changed files with 17 additions and 14 deletions

View File

@ -13,6 +13,7 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:paddingLeft="2dp" >
<LinearLayout
@ -29,6 +30,7 @@
style="?android:attr/windowTitleStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_weight="1"
android:ellipsize="marquee"
android:focusable="true"
@ -39,10 +41,11 @@
android:singleLine="true"
android:tag="title" />
<TextView
android:id="@+id/title_text"
android:id="@+id/title_text_summary"
style="?android:attr/windowTitleStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_weight="1"
android:gravity="center"
android:tag="title"
@ -52,6 +55,7 @@
style="?android:attr/windowTitleStyle"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="2dp"
android:layout_weight="1"
android:ellipsize="marquee"
android:focusable="true"
@ -127,7 +131,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="@+id/title_text_summary"
android:id="@+id/title_text"
style="?android:attr/windowTitleStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"

View File

@ -13,7 +13,8 @@
class="org.petero.droidfish.activities.ChessBoardEdit"
android:id="@+id/eb_chessboard"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
android:layout_height="fill_parent">
</view>
<TextView
android:text=""
android:id="@+id/eb_status"
@ -21,7 +22,8 @@
android:layout_height="wrap_content"
android:includeFontPadding="true"
android:typeface="monospace"
android:textSize="10dip"/>
android:textSize="10dip">
</TextView>
<LinearLayout
android:orientation="horizontal"
android:id="@+id/LinearLayout02"

View File

@ -65,13 +65,11 @@ public class EditBoard extends Activity {
private TextView status;
private Button okButton;
private Button cancelButton;
private TextView whiteTitleText, blackTitleText, engineTitleText;
private boolean egtbHints;
private boolean autoScrollTitle;
private TextView whiteFigText;
private TextView blackFigText;
private TextView summaryTitleText;
private Typeface figNotation;
@Override
@ -125,11 +123,11 @@ public class EditBoard extends Activity {
okButton = (Button)findViewById(R.id.eb_ok);
cancelButton = (Button)findViewById(R.id.eb_cancel);
whiteTitleText = (TextView)findViewById(R.id.white_clock);
whiteTitleText.setText(R.string.edit_board);
blackTitleText = (TextView)findViewById(R.id.black_clock);
TextView whiteTitleText = (TextView)findViewById(R.id.white_clock);
whiteTitleText.setVisibility(View.GONE);
TextView blackTitleText = (TextView)findViewById(R.id.black_clock);
blackTitleText.setVisibility(View.GONE);
engineTitleText = (TextView)findViewById(R.id.title_text);
TextView engineTitleText = (TextView)findViewById(R.id.title_text);
engineTitleText.setVisibility(View.GONE);
whiteFigText = (TextView) findViewById(R.id.white_pieces);
whiteFigText.setTypeface(figNotation);
@ -139,13 +137,12 @@ public class EditBoard extends Activity {
blackFigText.setTypeface(figNotation);
blackFigText.setSelected(true);
blackFigText.setTextColor(blackTitleText.getTextColors());
summaryTitleText = (TextView) findViewById(R.id.title_text_summary);
summaryTitleText.setVisibility(View.GONE);
TextView summaryTitleText = (TextView) findViewById(R.id.title_text_summary);
summaryTitleText.setText(R.string.edit_board);
TextUtils.TruncateAt where = autoScrollTitle ? TextUtils.TruncateAt.MARQUEE
: TextUtils.TruncateAt.END;
whiteTitleText.setEllipsize(where);
blackTitleText.setEllipsize(where);
engineTitleText.setEllipsize(where);
whiteFigText.setEllipsize(where);
blackFigText.setEllipsize(where);