mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-06 20:29:10 +01:00
DroidFish: Made it possible to open the options menu by clicking on the title bar.
This commit is contained in:
parent
4923b06e3c
commit
8becf3dc35
|
@ -186,7 +186,7 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||
private ImageButton modeButton, undoButton, redoButton;
|
||||
private ButtonActions custom1ButtonActions, custom2ButtonActions, custom3ButtonActions;
|
||||
private TextView whiteTitleText, blackTitleText, engineTitleText;
|
||||
private View secondTitleLine;
|
||||
private View firstTitleLine, secondTitleLine;
|
||||
private TextView whiteFigText, blackFigText, summaryTitleText;
|
||||
private static Dialog moveListMenuDlg;
|
||||
|
||||
|
@ -621,6 +621,7 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||
Util.overrideFonts(findViewById(android.R.id.content));
|
||||
|
||||
// title lines need to be regenerated every time due to layout changes (rotations)
|
||||
firstTitleLine = findViewById(R.id.first_title_line);
|
||||
secondTitleLine = findViewById(R.id.second_title_line);
|
||||
whiteTitleText = (TextView)findViewById(R.id.white_clock);
|
||||
whiteTitleText.setSelected(true);
|
||||
|
@ -649,6 +650,19 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||
moveList.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
thinking.setFocusable(false);
|
||||
|
||||
firstTitleLine.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openOptionsMenu();
|
||||
}
|
||||
});
|
||||
secondTitleLine.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openOptionsMenu();
|
||||
}
|
||||
});
|
||||
|
||||
cb = (ChessBoardPlay)findViewById(R.id.chessboard);
|
||||
cb.setFocusable(true);
|
||||
cb.requestFocus();
|
||||
|
|
|
@ -128,6 +128,8 @@ public class EditBoard extends Activity {
|
|||
setContentView(R.layout.editboard);
|
||||
Util.overrideFonts(findViewById(android.R.id.content));
|
||||
|
||||
View firstTitleLine = findViewById(R.id.first_title_line);
|
||||
View secondTitleLine = findViewById(R.id.second_title_line);
|
||||
cb = (ChessBoardEdit)findViewById(R.id.eb_chessboard);
|
||||
status = (TextView)findViewById(R.id.eb_status);
|
||||
okButton = (Button)findViewById(R.id.eb_ok);
|
||||
|
@ -156,6 +158,19 @@ public class EditBoard extends Activity {
|
|||
whiteFigText.setEllipsize(where);
|
||||
blackFigText.setEllipsize(where);
|
||||
|
||||
firstTitleLine.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openOptionsMenu();
|
||||
}
|
||||
});
|
||||
secondTitleLine.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
openOptionsMenu();
|
||||
}
|
||||
});
|
||||
|
||||
okButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
sendBackResult();
|
||||
|
|
Loading…
Reference in New Issue
Block a user