Corrected Keyboard to always take the remaining space available.

Fixed Delete button.
This commit is contained in:
Christopher Beckmann 2015-11-15 13:14:14 +01:00
parent 8a170f88bf
commit 6629c3d9a6
4 changed files with 5 additions and 7 deletions

View file

@ -310,7 +310,7 @@ public class GameController {
}
public void deleteSelectedValue() {
if(isCellSelected()) setValue(selectedRow, selectedCol, 0);
if(isCellSelected()) deleteValue(selectedRow, selectedCol);
}
public void toggleSelectedNote(int value) {

View file

@ -69,7 +69,6 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
keyboard.setRowCount(3);
Point p = new Point();
getWindowManager().getDefaultDisplay().getSize(p);
keyboard.getLayoutParams().height = (int)(p.y*0.3);
//int width = 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) {
//create new game
intent = new Intent(this, GameActivity.class);
intent = new Intent(this, NewGameActivity.class);
startActivity(intent);
} else if (id == R.id.nav_mainmenu) {

View file

@ -73,7 +73,6 @@ public class SudokuKeyboardLayout extends GridLayout {
public SudokuKeyboardLayout(Context context, AttributeSet attrs) {
super(context, attrs);
this.attrs = attrs;
}

View file

@ -21,11 +21,11 @@
<tu_darmstadt.sudoku.ui.view.SudokuKeyboardLayout
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_alignParentBottom="true"
android:layout_height="fill_parent"
android:layout_below="@+id/sudokuLayout"
android:id="@+id/sudokuKeyboardLayout"
android:layout_centerVertical="true"
>
android:layout_centerVertical="true">
<!-- <tu_darmstadt.sudoku.ui.view.SudokuButton
android:id="@+id/button2"
android:layout_width="50dp"