Corrected Keyboard to always take the remaining space available.
Fixed Delete button.
This commit is contained in:
parent
8a170f88bf
commit
6629c3d9a6
4 changed files with 5 additions and 7 deletions
|
@ -310,7 +310,7 @@ public class GameController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteSelectedValue() {
|
public void deleteSelectedValue() {
|
||||||
if(isCellSelected()) setValue(selectedRow, selectedCol, 0);
|
if(isCellSelected()) deleteValue(selectedRow, selectedCol);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleSelectedNote(int value) {
|
public void toggleSelectedNote(int value) {
|
||||||
|
|
|
@ -69,7 +69,6 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
||||||
keyboard.setRowCount(3);
|
keyboard.setRowCount(3);
|
||||||
Point p = new Point();
|
Point p = new Point();
|
||||||
getWindowManager().getDefaultDisplay().getSize(p);
|
getWindowManager().getDefaultDisplay().getSize(p);
|
||||||
keyboard.getLayoutParams().height = (int)(p.y*0.3);
|
|
||||||
//int width = p.x;
|
//int width = p.x;
|
||||||
keyboard.setKeyBoard(gameController.getSize(), p.x);
|
keyboard.setKeyBoard(gameController.getSize(), p.x);
|
||||||
/*
|
/*
|
||||||
|
@ -116,7 +115,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
||||||
|
|
||||||
if (id == R.id.nav_newgame) {
|
if (id == R.id.nav_newgame) {
|
||||||
//create new game
|
//create new game
|
||||||
intent = new Intent(this, GameActivity.class);
|
intent = new Intent(this, NewGameActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
} else if (id == R.id.nav_mainmenu) {
|
} else if (id == R.id.nav_mainmenu) {
|
||||||
|
|
|
@ -73,7 +73,6 @@ public class SudokuKeyboardLayout extends GridLayout {
|
||||||
public SudokuKeyboardLayout(Context context, AttributeSet attrs) {
|
public SudokuKeyboardLayout(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
this.attrs = attrs;
|
this.attrs = attrs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
|
|
||||||
<tu_darmstadt.sudoku.ui.view.SudokuKeyboardLayout
|
<tu_darmstadt.sudoku.ui.view.SudokuKeyboardLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="200dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_below="@+id/sudokuLayout"
|
||||||
android:id="@+id/sudokuKeyboardLayout"
|
android:id="@+id/sudokuKeyboardLayout"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true">
|
||||||
>
|
|
||||||
<!-- <tu_darmstadt.sudoku.ui.view.SudokuButton
|
<!-- <tu_darmstadt.sudoku.ui.view.SudokuButton
|
||||||
android:id="@+id/button2"
|
android:id="@+id/button2"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
|
|
Loading…
Reference in a new issue