parent
36766b224a
commit
98bacc4dc3
29 changed files with 285 additions and 41 deletions
|
@ -23,6 +23,7 @@ import android.app.DialogFragment;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
@ -198,6 +199,11 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||||
difficultyBar.setRating(GameDifficulty.getValidDifficultyList().indexOf(lastChosenDifficulty) + 1);
|
difficultyBar.setRating(GameDifficulty.getValidDifficultyList().indexOf(lastChosenDifficulty) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Configuration.SCREENLAYOUT_SIZE_SMALL == (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)) {
|
||||||
|
difficultyBar.setScaleX(0.75f);
|
||||||
|
difficultyBar.setScaleY(0.75f);
|
||||||
|
}
|
||||||
|
|
||||||
// on first create always check for loadable levels!
|
// on first create always check for loadable levels!
|
||||||
SharedPreferences.Editor editor = settings.edit();
|
SharedPreferences.Editor editor = settings.edit();
|
||||||
editor.putBoolean("savesChanged", true);
|
editor.putBoolean("savesChanged", true);
|
||||||
|
|
|
@ -23,6 +23,7 @@ import android.app.DialogFragment;
|
||||||
import android.app.FragmentManager;
|
import android.app.FragmentManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
@ -58,6 +59,7 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi
|
||||||
Canvas canvas;
|
Canvas canvas;
|
||||||
FragmentManager fragmentManager;
|
FragmentManager fragmentManager;
|
||||||
Context context;
|
Context context;
|
||||||
|
float buttonMargin;
|
||||||
|
|
||||||
OnClickListener listener = new OnClickListener() {
|
OnClickListener listener = new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -95,6 +97,11 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi
|
||||||
|
|
||||||
public CreateSudokuSpecialButtonLayout(Context context, AttributeSet attrs) {
|
public CreateSudokuSpecialButtonLayout(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
|
|
||||||
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CreateSudokuSpecialButtonLayout);
|
||||||
|
buttonMargin = a.getDimension(R.styleable.CreateSudokuSpecialButtonLayout_createSudokuSpecialKeyboardMargin, 5f);
|
||||||
|
a.recycle();
|
||||||
|
|
||||||
setWeightSum(fixedButtonsCount);
|
setWeightSum(fixedButtonsCount);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +124,7 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi
|
||||||
if(gameController != null) {
|
if(gameController != null) {
|
||||||
gameController.registerHighlightChangedListener(this);
|
gameController.registerHighlightChangedListener(this);
|
||||||
}
|
}
|
||||||
fixedButtons = new CreateSudokuSpecialButton[fixedButtonsCount];
|
fixedButtons = new CreateSudokuSpecialButton[fixedButtonsCount];
|
||||||
LayoutParams p;
|
LayoutParams p;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
//ArrayList<SudokuButtonType> type = (ArrayList<SudokuButtonType>) SudokuButtonType.getSpecialButtons();
|
//ArrayList<SudokuButtonType> type = (ArrayList<SudokuButtonType>) SudokuButtonType.getSpecialButtons();
|
||||||
|
@ -127,9 +134,9 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi
|
||||||
p = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1);
|
p = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1);
|
||||||
} else {
|
} else {
|
||||||
p = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1);
|
p = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1);
|
||||||
fixedButtons[i].setPadding(25, 0, 25, 0);
|
fixedButtons[i].setPadding((int)buttonMargin*5, 0, (int)buttonMargin*5, 0);
|
||||||
}
|
}
|
||||||
p.setMargins(5, 5, 5, 5);
|
p.setMargins((int)buttonMargin, (int)buttonMargin, (int)buttonMargin, (int)buttonMargin);
|
||||||
|
|
||||||
//int width2 =width/(fixedButtonsCount);
|
//int width2 =width/(fixedButtonsCount);
|
||||||
//p.width= width2-15;
|
//p.width= width2-15;
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
package org.secuso.privacyfriendlysudoku.ui.view;
|
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
@ -42,6 +44,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
||||||
Symbol symbolsToUse = Symbol.Default;
|
Symbol symbolsToUse = Symbol.Default;
|
||||||
float normalTextSize = 20; // in sp
|
float normalTextSize = 20; // in sp
|
||||||
LinearLayout [] layouts = new LinearLayout[2];
|
LinearLayout [] layouts = new LinearLayout[2];
|
||||||
|
float buttonMargin;
|
||||||
|
|
||||||
OnClickListener listener = new OnClickListener() {
|
OnClickListener listener = new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,6 +61,11 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
||||||
public SudokuKeyboardLayout(Context context, AttributeSet attrs) {
|
public SudokuKeyboardLayout(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
this.attrs = attrs;
|
this.attrs = attrs;
|
||||||
|
|
||||||
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SudokuKeyboardLayout);
|
||||||
|
buttonMargin = a.getDimension(R.styleable.SudokuKeyboardLayout_sudokuKeyboardMargin, 5f);
|
||||||
|
normalTextSize = a.getDimension(R.styleable.SudokuKeyboardLayout_sudokuKeyboardTextSize, 20f);
|
||||||
|
a.recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSymbols(Symbol s) {
|
public void setSymbols(Symbol s) {
|
||||||
|
@ -85,7 +93,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
||||||
p = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, 1);
|
p = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, 1);
|
||||||
}
|
}
|
||||||
//if (i == 0) p.bottomMargin=10; else p.topMargin=10;
|
//if (i == 0) p.bottomMargin=10; else p.topMargin=10;
|
||||||
p.setMargins(0, 5, 0, 5);
|
p.setMargins(0, (int) buttonMargin, 0, (int) buttonMargin);
|
||||||
layouts[i] = new LinearLayout(getContext(),null);
|
layouts[i] = new LinearLayout(getContext(),null);
|
||||||
layouts[i].setLayoutParams(p);
|
layouts[i].setLayoutParams(p);
|
||||||
layouts[i].setWeightSum(numberOfButtonsPerRow);
|
layouts[i].setWeightSum(numberOfButtonsPerRow);
|
||||||
|
@ -106,7 +114,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
||||||
} else {
|
} else {
|
||||||
p = new LayoutParams(LayoutParams.MATCH_PARENT, 0, 1);
|
p = new LayoutParams(LayoutParams.MATCH_PARENT, 0, 1);
|
||||||
}
|
}
|
||||||
p.setMargins(5,5,5,5);
|
p.setMargins((int) buttonMargin, (int) buttonMargin, (int) buttonMargin, (int) buttonMargin);
|
||||||
buttons[buttonIndex].setLayoutParams(p);
|
buttons[buttonIndex].setLayoutParams(p);
|
||||||
/* removed GridLayout because of bad scaling will use now a Linearlayout
|
/* removed GridLayout because of bad scaling will use now a Linearlayout
|
||||||
Spec rowSpec = spec(k,1);
|
Spec rowSpec = spec(k,1);
|
||||||
|
|
|
@ -23,6 +23,7 @@ import android.app.DialogFragment;
|
||||||
import android.app.FragmentManager;
|
import android.app.FragmentManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
@ -59,6 +60,7 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh
|
||||||
Canvas canvas;
|
Canvas canvas;
|
||||||
FragmentManager fragmentManager;
|
FragmentManager fragmentManager;
|
||||||
Context context;
|
Context context;
|
||||||
|
float buttonMargin;
|
||||||
|
|
||||||
OnClickListener listener = new OnClickListener() {
|
OnClickListener listener = new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -111,6 +113,11 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh
|
||||||
|
|
||||||
public SudokuSpecialButtonLayout(Context context, AttributeSet attrs) {
|
public SudokuSpecialButtonLayout(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
|
|
||||||
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SudokuSpecialButtonLayout);
|
||||||
|
buttonMargin = a.getDimension(R.styleable.SudokuSpecialButtonLayout_sudokuSpecialKeyboardMargin, 5f);
|
||||||
|
a.recycle();
|
||||||
|
|
||||||
setWeightSum(fixedButtonsCount);
|
setWeightSum(fixedButtonsCount);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
@ -140,8 +147,8 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh
|
||||||
} else {
|
} else {
|
||||||
p = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0, 1);
|
p = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0, 1);
|
||||||
}
|
}
|
||||||
fixedButtons[i].setPadding(25, 0, 25, 0);
|
fixedButtons[i].setPadding((int)buttonMargin*5, 0, (int)buttonMargin*5, 0);
|
||||||
p.setMargins(5, 5, 5, 5);
|
p.setMargins((int)buttonMargin, (int)buttonMargin, (int)buttonMargin, (int)buttonMargin);
|
||||||
|
|
||||||
//int width2 =width/(fixedButtonsCount);
|
//int width2 =width/(fixedButtonsCount);
|
||||||
//p.width= width2-15;
|
//p.width= width2-15;
|
||||||
|
|
11
app/src/main/res/drawable-hdpi/numpad_highlighted.xml
Normal file
11
app/src/main/res/drawable-hdpi/numpad_highlighted.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:endColor="@color/lightblue"
|
||||||
|
android:startColor="@color/lightblue" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="10px"
|
||||||
|
android:color="@color/colorPrimaryDark" />
|
||||||
|
</shape>
|
11
app/src/main/res/drawable-hdpi/numpad_highlighted_four.xml
Normal file
11
app/src/main/res/drawable-hdpi/numpad_highlighted_four.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:endColor="@color/lightblue"
|
||||||
|
android:startColor="@color/lightblue" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="10px"
|
||||||
|
android:color="@color/black" />
|
||||||
|
</shape>
|
11
app/src/main/res/drawable-hdpi/numpad_highlighted_three.xml
Normal file
11
app/src/main/res/drawable-hdpi/numpad_highlighted_three.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:endColor="@color/lightblue"
|
||||||
|
android:startColor="@color/lightblue" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="10px"
|
||||||
|
android:color="@color/yellow" />
|
||||||
|
</shape>
|
11
app/src/main/res/drawable-hdpi/numpad_selected_complete.xml
Normal file
11
app/src/main/res/drawable-hdpi/numpad_selected_complete.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:endColor="@color/green"
|
||||||
|
android:startColor="@color/green" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="10px"
|
||||||
|
android:color="@color/yellow" />
|
||||||
|
</shape>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:endColor="@color/lightblue"
|
||||||
|
android:startColor="@color/lightblue" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="10px"
|
||||||
|
android:color="@color/white" />
|
||||||
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="?attr/activeButtonColor" />
|
android:startColor="?attr/activeButtonColor" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="?attr/sudokuButtonBorderWidth"
|
||||||
android:color="?attr/standardVectorGraphic" />
|
android:color="?attr/standardVectorGraphic" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="?attr/activeButtonColor" />
|
android:startColor="?attr/activeButtonColor" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="?attr/sudokuButtonBorderWidth"
|
||||||
android:color="?attr/colorPrimaryDark" />
|
android:color="?attr/colorPrimaryDark" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="?attr/activeButtonColor" />
|
android:startColor="?attr/activeButtonColor" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="?attr/sudokuButtonBorderWidth"
|
||||||
android:color="?attr/standardVectorGraphic" />
|
android:color="?attr/standardVectorGraphic" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="?attr/activeButtonColor" />
|
android:startColor="?attr/activeButtonColor" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="?attr/sudokuButtonBorderWidth"
|
||||||
android:color="?attr/highlightedButtonBorder" />
|
android:color="?attr/highlightedButtonBorder" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="?attr/completedButtonColor" />
|
android:startColor="?attr/completedButtonColor" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="?attr/sudokuButtonBorderWidth"
|
||||||
android:color="?attr/completedButtonBorder" />
|
android:color="?attr/completedButtonBorder" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 8.8 KiB |
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="@color/lightblue" />
|
android:startColor="@color/lightblue" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="2px"
|
||||||
android:color="@color/colorPrimaryDark" />
|
android:color="@color/colorPrimaryDark" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="@color/lightblue" />
|
android:startColor="@color/lightblue" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="2px"
|
||||||
android:color="@color/black" />
|
android:color="@color/black" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="@color/lightblue" />
|
android:startColor="@color/lightblue" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="2px"
|
||||||
android:color="@color/yellow" />
|
android:color="@color/yellow" />
|
||||||
</shape>
|
</shape>
|
|
@ -6,6 +6,6 @@
|
||||||
android:startColor="@color/green" />
|
android:startColor="@color/green" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="10px"
|
android:width="2px"
|
||||||
android:color="@color/yellow" />
|
android:color="@color/yellow" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
<gradient android:endColor="@color/darkyellow" android:startColor="@color/darkyellow" />
|
<gradient android:endColor="@color/green" android:startColor="@color/green" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
59
app/src/main/res/layout-hdpi/content_game_view.xml
Normal file
59
app/src/main/res/layout-hdpi/content_game_view.xml
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/main_content"
|
||||||
|
android:layout_marginTop="?android:actionBarSize"
|
||||||
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
|
tools:context="org.secuso.privacyfriendlysudoku.ui.GameActivity">
|
||||||
|
|
||||||
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
||||||
|
android:id="@+id/sudokuLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/sudokuButtonLayout"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/sudokuButtonLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="200dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/sudokuLayout"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
||||||
|
android:id="@+id/sudokuKeyboardLayout"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="0px"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="2" />
|
||||||
|
|
||||||
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout
|
||||||
|
android:id="@+id/sudokuSpecialLayout"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:weightSum="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/main_content"
|
||||||
|
android:layout_marginTop="?android:actionBarSize"
|
||||||
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
|
tools:context="org.secuso.privacyfriendlysudoku.ui.GameActivity">
|
||||||
|
|
||||||
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
||||||
|
android:id="@+id/sudokuLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:gravity="center"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/sudokuButtonLayout"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/sudokuButtonLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="200dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/sudokuLayout"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
||||||
|
android:id="@+id/sudokuKeyboardLayout"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="0px"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:weightSum="2" />
|
||||||
|
|
||||||
|
<org.secuso.privacyfriendlysudoku.ui.view.CreateSudokuSpecialButtonLayout
|
||||||
|
android:id="@+id/createSudokuLayout"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:weightSum="1" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/main_content"
|
android:layout_marginTop="?actionBarSize"
|
||||||
android:layout_marginTop="?android:actionBarSize"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
tools:context="org.secuso.privacyfriendlysudoku.ui.GameActivity">
|
tools:context="org.secuso.privacyfriendlysudoku.ui.GameActivity"
|
||||||
|
tools:layout_editor_absoluteY="56dp">
|
||||||
|
|
||||||
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
||||||
android:id="@+id/sudokuLayout"
|
android:id="@+id/sudokuLayout"
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
app:layout_constraintVertical_weight="2"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/sudokuButtonLayout"
|
app:layout_constraintBottom_toTopOf="@+id/sudokuButtonLayout"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -30,14 +31,14 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/sudokuButtonLayout"
|
android:id="@+id/sudokuButtonLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:minHeight="200dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:weightSum="3"
|
android:weightSum="3"
|
||||||
app:layout_constraintTop_toBottomOf="@id/sudokuLayout"
|
app:layout_constraintVertical_weight="1"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/sudokuLayout">
|
||||||
|
|
||||||
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
||||||
android:id="@+id/sudokuKeyboardLayout"
|
android:id="@+id/sudokuKeyboardLayout"
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/main_content"
|
android:layout_marginTop="?actionBarSize"
|
||||||
android:layout_marginTop="?android:actionBarSize"
|
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
tools:context="org.secuso.privacyfriendlysudoku.ui.GameActivity">
|
tools:context="org.secuso.privacyfriendlysudoku.ui.GameActivity"
|
||||||
|
tools:layout_editor_absoluteY="56dp">
|
||||||
|
|
||||||
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout
|
||||||
android:id="@+id/sudokuLayout"
|
android:id="@+id/sudokuLayout"
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
app:layout_constraintVertical_weight="2"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/sudokuButtonLayout"
|
app:layout_constraintBottom_toTopOf="@+id/sudokuButtonLayout"
|
||||||
app:layout_constraintDimensionRatio="1:1"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -30,14 +31,14 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/sudokuButtonLayout"
|
android:id="@+id/sudokuButtonLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:minHeight="200dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:weightSum="3"
|
android:weightSum="3"
|
||||||
app:layout_constraintTop_toBottomOf="@id/sudokuLayout"
|
app:layout_constraintVertical_weight="1"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/sudokuLayout">
|
||||||
|
|
||||||
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
<org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout
|
||||||
android:id="@+id/sudokuKeyboardLayout"
|
android:id="@+id/sudokuKeyboardLayout"
|
||||||
|
|
15
app/src/main/res/values-hdpi/styles.xml
Normal file
15
app/src/main/res/values-hdpi/styles.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="AppTheme" parent="BaseAppTheme">
|
||||||
|
<item name="sudokuKeyboardMargin">2dp</item>
|
||||||
|
<item name="sudokuKeyboardTextSize">20sp</item>
|
||||||
|
<item name="sudokuSpecialKeyboardMargin">2dp</item>
|
||||||
|
<item name="createSudokuSpecialKeyboardMargin">2dp</item>
|
||||||
|
<item name="sudokuButtonBorderWidth">10px</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight">
|
<style name="BaseAppTheme" parent="Theme.AppCompat.DayNight">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimaryDark</item>
|
<item name="colorPrimary">@color/colorPrimaryDark</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
@ -43,6 +43,10 @@
|
||||||
<item name="sudokuCellTextColor">@color/white</item>
|
<item name="sudokuCellTextColor">@color/white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme" parent="BaseAppTheme">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="ToolbarStyle" parent="Widget.AppCompat.ActionBar">
|
<style name="ToolbarStyle" parent="Widget.AppCompat.ActionBar">
|
||||||
<item name="android:textColorPrimary">@color/white</item>
|
<item name="android:textColorPrimary">@color/white</item>
|
||||||
<item name="colorControlNormal">@color/white</item>
|
<item name="colorControlNormal">@color/white</item>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<attr name="backgroundTutorialSlide" format="color"/>
|
<attr name="backgroundTutorialSlide" format="color"/>
|
||||||
<attr name="backgroundTutorialStars" format="color"/>
|
<attr name="backgroundTutorialStars" format="color"/>
|
||||||
<attr name="blueHighlight" format="color"/>
|
<attr name="blueHighlight" format="color"/>
|
||||||
|
<attr name="sudokuButtonBorderWidth" format="dimension"/>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<declare-styleable name="SudokuCellView">
|
<declare-styleable name="SudokuCellView">
|
||||||
|
@ -38,4 +39,17 @@
|
||||||
<attr name="sudokuFieldSectionLineColor" format="color" />
|
<attr name="sudokuFieldSectionLineColor" format="color" />
|
||||||
<attr name="sudokuFieldErrorColor" format="color" />
|
<attr name="sudokuFieldErrorColor" format="color" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
|
<declare-styleable name="SudokuKeyboardLayout">
|
||||||
|
<attr name="sudokuKeyboardMargin" format="dimension" />
|
||||||
|
<attr name="sudokuKeyboardTextSize" format="dimension" />
|
||||||
|
</declare-styleable>
|
||||||
|
|
||||||
|
<declare-styleable name="SudokuSpecialButtonLayout">
|
||||||
|
<attr name="sudokuSpecialKeyboardMargin" format="dimension" />
|
||||||
|
</declare-styleable>
|
||||||
|
|
||||||
|
<declare-styleable name="CreateSudokuSpecialButtonLayout">
|
||||||
|
<attr name="createSudokuSpecialKeyboardMargin" format="dimension" />
|
||||||
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
|
@ -1,7 +1,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight">
|
<style name="BaseAppTheme" parent="Theme.AppCompat.DayNight">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimaryDark</item>
|
<item name="colorPrimary">@color/colorPrimaryDark</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
@ -43,6 +43,14 @@
|
||||||
<item name="sudokuCellTextColor">@color/black</item>
|
<item name="sudokuCellTextColor">@color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme" parent="BaseAppTheme">
|
||||||
|
<item name="sudokuKeyboardMargin">1dp</item>
|
||||||
|
<item name="sudokuKeyboardTextSize">10sp</item>
|
||||||
|
<item name="sudokuSpecialKeyboardMargin">1dp</item>
|
||||||
|
<item name="createSudokuSpecialKeyboardMargin">1dp</item>
|
||||||
|
<item name="sudokuButtonBorderWidth">2px</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="ToolbarStyle" parent="Widget.AppCompat.ActionBar">
|
<style name="ToolbarStyle" parent="Widget.AppCompat.ActionBar">
|
||||||
<item name="android:textColorPrimary">@color/white</item>
|
<item name="android:textColorPrimary">@color/white</item>
|
||||||
<item name="colorControlNormal">@color/white</item>
|
<item name="colorControlNormal">@color/white</item>
|
||||||
|
|
Loading…
Reference in a new issue