DroidFish: Don't let the "thinking" view take up screen space when it is empty.

This commit is contained in:
Peter Osterlund
2011-12-24 09:08:49 +00:00
parent bdb55f5677
commit 97e5585d3a

View File

@@ -424,9 +424,11 @@ public class DroidFish extends Activity implements GUIInterface {
}); });
thinking.setOnLongClickListener(new OnLongClickListener() { thinking.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
if (!pvMoves.isEmpty()) { if (mShowThinking || gameMode.analysisMode()) {
removeDialog(THINKING_MENU_DIALOG); if (!pvMoves.isEmpty()) {
showDialog(THINKING_MENU_DIALOG); removeDialog(THINKING_MENU_DIALOG);
showDialog(THINKING_MENU_DIALOG);
}
} }
return true; return true;
} }
@@ -966,7 +968,9 @@ public class DroidFish extends Activity implements GUIInterface {
s += "<br>"; s += "<br>";
s += "<b>" + getString(R.string.variation) + "</b> " + variantStr; s += "<b>" + getString(R.string.variation) + "</b> " + variantStr;
thinking.append(Html.fromHtml(s)); thinking.append(Html.fromHtml(s));
thinkingEmpty = false;
} }
thinking.setVisibility(thinkingEmpty ? View.GONE : View.VISIBLE);
List<Move> hints = null; List<Move> hints = null;
if (mShowThinking || gameMode.analysisMode()) { if (mShowThinking || gameMode.analysisMode()) {
@@ -1528,6 +1532,8 @@ public class DroidFish extends Activity implements GUIInterface {
if (numPV < maxPV) { if (numPV < maxPV) {
lst.add(getString(R.string.more_variations)); actions.add(MULTIPV_INC); lst.add(getString(R.string.more_variations)); actions.add(MULTIPV_INC);
} }
}
if (thinkingStr1.length() > 0) {
if (mShowStats) { if (mShowStats) {
lst.add(getString(R.string.hide_statistics)); actions.add(HIDE_STATISTICS); lst.add(getString(R.string.hide_statistics)); actions.add(HIDE_STATISTICS);
} else { } else {