mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-12 17:12:40 +01:00
DroidFish: Don't let the "thinking" view take up screen space when it is empty.
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user