Added a custom style for the RatingBar. Fixed some layout issues with tablets and very small screens.
This commit is contained in:
parent
a88fbce439
commit
ee617bc4c3
22 changed files with 416 additions and 58 deletions
|
@ -308,7 +308,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
|||
dialog.show();
|
||||
|
||||
final Activity activity = this;
|
||||
((Button)dialog.findViewById(R.id.win_button)).setOnClickListener(new View.OnClickListener() {
|
||||
((Button)dialog.findViewById(R.id.win_continue_button)).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
|
@ -318,7 +318,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
|||
activity.finish();
|
||||
}
|
||||
});
|
||||
((Button)dialog.findViewById(R.id.win_button2)).setOnClickListener(new View.OnClickListener() {
|
||||
((Button)dialog.findViewById(R.id.win_showGame_button)).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.graphics.Canvas;
|
|||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -26,7 +27,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
|||
SudokuButton [] buttons;
|
||||
GameController gameController;
|
||||
Symbol symbolsToUse = Symbol.Default;
|
||||
float normalTextSize = 30; // in sp
|
||||
float normalTextSize = 20; // in sp
|
||||
LinearLayout [] layouts = new LinearLayout[2];
|
||||
|
||||
OnClickListener listener = new OnClickListener() {
|
||||
|
@ -61,6 +62,8 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
|||
int numberOfButtonsPerRow = (size % 2 == 0) ? size/2 :(size+1)/2;
|
||||
int numberOfButtons = numberOfButtonsPerRow * 2;
|
||||
|
||||
normalTextSize = (int) getResources().getDimension(R.dimen.text_size) / getResources().getDisplayMetrics().scaledDensity;
|
||||
|
||||
buttons = new SudokuButton[numberOfButtons];
|
||||
|
||||
//set layout parameters and init Layouts
|
||||
|
@ -71,7 +74,7 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
|||
p = new LayoutParams(0, LayoutParams.MATCH_PARENT, 1);
|
||||
}
|
||||
//if (i == 0) p.bottomMargin=10; else p.topMargin=10;
|
||||
p.setMargins(0,5,0,5);
|
||||
p.setMargins(0, 5, 0, 5);
|
||||
layouts[i] = new LinearLayout(getContext(),null);
|
||||
layouts[i].setLayoutParams(p);
|
||||
layouts[i].setWeightSum(numberOfButtonsPerRow);
|
||||
|
@ -110,12 +113,13 @@ public class SudokuKeyboardLayout extends LinearLayout implements IHighlightChan
|
|||
*/
|
||||
|
||||
// buttons[number].setLayoutParams(p);
|
||||
//buttons[number].setGravity(Gravity.CENTER);
|
||||
buttons[buttonIndex].setType(SudokuButtonType.Value);
|
||||
buttons[buttonIndex].setTextColor(getResources().getColor(R.color.white));
|
||||
buttons[buttonIndex].setBackgroundResource(R.drawable.mnenomic_numpad_button);
|
||||
buttons[buttonIndex].setPadding(0, 0, 0, 0);
|
||||
buttons[buttonIndex].setGravity(Gravity.CENTER);
|
||||
buttons[buttonIndex].setText(Symbol.getSymbol(symbolsToUse, buttonIndex));
|
||||
buttons[buttonIndex].setTextSize(TypedValue.COMPLEX_UNIT_SP,normalTextSize);
|
||||
buttons[buttonIndex].setTextSize(TypedValue.COMPLEX_UNIT_SP, normalTextSize);
|
||||
buttons[buttonIndex].setValue(buttonIndex + 1);
|
||||
buttons[buttonIndex].setOnClickListener(listener);
|
||||
|
||||
|
|
|
@ -171,6 +171,9 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh
|
|||
|
||||
fixedButtons[i].setImageBitmap(bitResult);
|
||||
fixedButtons[i].setBackgroundResource(gameController.getNoteStatus() ? R.drawable.numpad_highlighted_three : R.drawable.numpad_highlighted_four);
|
||||
|
||||
keyboard.updateNotesEnabled();
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
BIN
app/src/main/res/drawable-xhdpi/ic_star_black_48dp.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_star_black_48dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 887 B |
BIN
app/src/main/res/drawable-xhdpi/ic_star_half_black_48dp.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_star_half_black_48dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 712 B |
BIN
app/src/main/res/drawable/ic_star_black_48dp.png
Normal file
BIN
app/src/main/res/drawable/ic_star_black_48dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 668 B |
BIN
app/src/main/res/drawable/ic_star_half_black_48dp.png
Normal file
BIN
app/src/main/res/drawable/ic_star_half_black_48dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 537 B |
34
app/src/main/res/drawable/ratingbar.xml
Normal file
34
app/src/main/res/drawable/ratingbar.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<bitmap
|
||||
android:src="@drawable/ic_star_black_48dp"
|
||||
android:tint="@color/middlegrey" />
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<bitmap
|
||||
android:src="@drawable/ic_star_half_black_48dp"
|
||||
android:tint="@color/middlegrey" />
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<bitmap
|
||||
android:src="@drawable/ic_star_black_48dp"
|
||||
android:tint="@color/colorAccent" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -109,11 +109,10 @@
|
|||
android:id="@+id/difficultyBar"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:clickable="true"
|
||||
android:numStars="4"
|
||||
android:numStars="3"
|
||||
android:rating="1"
|
||||
android:stepSize="1"
|
||||
android:scaleX="1.2"
|
||||
android:scaleY="1.2"/>
|
||||
style="@style/RatingBar"/>
|
||||
|
||||
<Button
|
||||
android:textColor="@color/white"
|
||||
|
|
238
app/src/main/res/layout-small/activity_main_menu.xml
Normal file
238
app/src/main/res/layout-small/activity_main_menu.xml
Normal file
|
@ -0,0 +1,238 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
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:fitsSystemWindows="true"
|
||||
tools:context="tu_darmstadt.sudoku.ui.MainActivity"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout_main"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="10"
|
||||
style="?android:buttonBarStyle">
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/scroller"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arrow_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_centerVertical="true"
|
||||
android:onClick="onClick"/>
|
||||
<ImageView
|
||||
android:id="@+id/arrow_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:layout_centerVertical="true"
|
||||
android:onClick="onClick"/>
|
||||
</RelativeLayout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="6"
|
||||
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="tu_darmstadt.sudoku.ui.MainActivity"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="8"
|
||||
android:divider="#000"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/difficultyText"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/difficulty_easy"
|
||||
android:textSize="@dimen/main_text_difficulty"/>
|
||||
|
||||
<RatingBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/difficultyBar"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:clickable="true"
|
||||
android:numStars="3"
|
||||
android:rating="1"
|
||||
android:stepSize="1"
|
||||
android:scaleX="0.75"
|
||||
android:scaleY="0.75"
|
||||
style="@style/RatingBar"/>
|
||||
|
||||
<Button
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/main_button_padding"
|
||||
android:layout_marginRight="@dimen/main_button_padding"
|
||||
android:text="@string/new_game"
|
||||
android:textStyle="normal"
|
||||
android:textSize="@dimen/text_size"
|
||||
android:id="@+id/playButton"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="3"
|
||||
android:onClick="onClick"
|
||||
android:capitalize="none"
|
||||
android:clickable="false"
|
||||
android:elevation="10dp"
|
||||
android:background="@drawable/standalone_button"/>
|
||||
|
||||
<Button
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/main_button_padding"
|
||||
android:layout_marginRight="@dimen/main_button_padding"
|
||||
android:text="@string/menu_continue_game"
|
||||
android:textStyle="normal"
|
||||
android:textSize="@dimen/text_size"
|
||||
android:id="@+id/continueButton"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="3"
|
||||
android:onClick="onClick"
|
||||
android:capitalize="none"
|
||||
android:clickable="false"
|
||||
android:background="@drawable/standalone_button"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Win Debug"
|
||||
android:visibility="invisible"
|
||||
android:onClick="callFragment"/>
|
||||
<!--
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:weightSum="2">
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="1dp"
|
||||
android:text="@string/menu_highscore"
|
||||
android:textStyle="normal"
|
||||
android:id="@+id/highscoreButton"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:onClick="onClick"
|
||||
android:capitalize="none"
|
||||
android:clickable="false"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:text="@string/menu_settings"
|
||||
android:textStyle="normal"
|
||||
android:id="@+id/settingsButton"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:onClick="onClick"
|
||||
android:capitalize="none"
|
||||
android:clickable="false"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:weightSum="2">
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="1dp"
|
||||
android:text="@string/menu_about"
|
||||
android:textStyle="normal"
|
||||
android:id="@+id/aboutButton"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:onClick="onClick"
|
||||
android:capitalize="none"
|
||||
android:clickable="false"/>
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:text="@string/menu_help"
|
||||
android:textStyle="normal"
|
||||
android:id="@+id/helpButton"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="1"
|
||||
android:onClick="onClick"
|
||||
android:capitalize="none"
|
||||
android:clickable="false"/>
|
||||
</LinearLayout>
|
||||
-->
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view_main"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/white"
|
||||
app:menu="@menu/menu_drawer_main"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -102,23 +102,25 @@
|
|||
android:text="@string/difficulty_easy"
|
||||
android:textSize="@dimen/main_text_difficulty"/>
|
||||
|
||||
<RatingBar style="@style/BlueRatingBarSize"
|
||||
<RatingBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/difficultyBar"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:clickable="true"
|
||||
android:numStars="4"
|
||||
android:numStars="3"
|
||||
android:rating="1"
|
||||
android:padding="0dp"
|
||||
android:layout_margin="0dp"
|
||||
android:stepSize="1"
|
||||
android:scaleX="3"
|
||||
android:scaleY="3"
|
||||
android:paddingTop="70dp"/>
|
||||
android:paddingTop="70dp"
|
||||
style="@style/RatingBar"/>
|
||||
|
||||
<Button
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/main_button_padding"
|
||||
android:layout_marginRight="@dimen/main_button_padding"
|
||||
android:text="@string/new_game"
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="300dp"
|
||||
android:layout_width="fill_parent" android:layout_height="370dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
android:layout_gravity="center"
|
||||
>
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="250dp" android:layout_height="250dp"
|
||||
android:background="@drawable/ic_trophy_black_48dp"
|
||||
android:weightSum="5"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center"
|
||||
>
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
@ -47,10 +45,10 @@
|
|||
android:weightSum="5"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginTop="46dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
|
@ -133,25 +131,26 @@
|
|||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="250dp"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:paddingTop="5dp"
|
||||
android:weightSum="2">
|
||||
<Button
|
||||
android:id="@+id/win_button"
|
||||
android:id="@+id/win_continue_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:background="@drawable/standalone_button"
|
||||
android:textColor="@color/white"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/win_button_text"
|
||||
android:layout_marginRight="5dp"/>
|
||||
<Button
|
||||
android:id="@+id/win_button2"
|
||||
android:id="@+id/win_showGame_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:background="@drawable/standalone_button"
|
||||
android:textColor="@color/white"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/win_show_game"
|
|
@ -5,6 +5,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="#FFFFFF"
|
||||
android:orientation="vertical"
|
||||
android:isScrollContainer="true"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
|
|
|
@ -80,8 +80,7 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_below="@+id/scroller"
|
||||
android:layout_height="0px"
|
||||
android:layout_weight="6"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
|
@ -92,8 +91,7 @@
|
|||
android:weightSum="8"
|
||||
android:divider="#000"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_horizontal"
|
||||
style="?android:buttonBarStyle">
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/difficultyText"
|
||||
|
@ -102,17 +100,16 @@
|
|||
android:text="@string/difficulty_easy"
|
||||
android:textSize="@dimen/main_text_difficulty"/>
|
||||
|
||||
<RatingBar style="@style/BlueRatingBarSize"
|
||||
<RatingBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/difficultyBar"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:clickable="true"
|
||||
android:numStars="4"
|
||||
android:numStars="3"
|
||||
android:rating="1"
|
||||
android:stepSize="1"
|
||||
android:scaleX="1.2"
|
||||
android:scaleY="1.2"/>
|
||||
style="@style/RatingBar"/>
|
||||
|
||||
<Button
|
||||
android:textColor="@color/white"
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="300dp"
|
||||
android:layout_width="fill_parent" android:layout_height="320dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
android:layout_gravity="center"
|
||||
>
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="250dp" android:layout_height="250dp"
|
||||
android:background="@drawable/ic_trophy_black_48dp"
|
||||
android:weightSum="5"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center"
|
||||
>
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
@ -47,10 +45,10 @@
|
|||
android:weightSum="5"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginTop="46dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
|
@ -140,19 +138,19 @@
|
|||
android:paddingTop="5dp"
|
||||
android:weightSum="2">
|
||||
<Button
|
||||
android:id="@+id/win_button"
|
||||
android:id="@+id/win_continue_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:background="@drawable/standalone_button"
|
||||
android:textColor="@color/white"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/win_button_text"
|
||||
android:layout_marginRight="5dp"/>
|
||||
<Button
|
||||
android:id="@+id/win_button2"
|
||||
android:id="@+id/win_showGame_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:background="@drawable/standalone_button"
|
||||
android:textColor="@color/white"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/win_show_game"
|
||||
|
|
11
app/src/main/res/values-small/dimens.xml
Normal file
11
app/src/main/res/values-small/dimens.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="activity_horizontal_margin">3dp</dimen>
|
||||
<dimen name="activity_vertical_margin">3dp</dimen>
|
||||
|
||||
<dimen name="text_size">12sp</dimen>
|
||||
<dimen name="main_text_difficulty">20sp</dimen>
|
||||
<dimen name="main_button_padding">10dp</dimen>
|
||||
|
||||
</resources>
|
|
@ -1,7 +0,0 @@
|
|||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
<dimen name="navigation_separator_vertical_padding">0dp</dimen>
|
||||
</resources>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="text_size">25sp</dimen>
|
||||
<dimen name="text_size">40sp</dimen>
|
||||
|
||||
<dimen name="main_text_difficulty">40sp</dimen>
|
||||
|
||||
|
|
9
app/src/main/res/values-xlarge/styles.xml
Normal file
9
app/src/main/res/values-xlarge/styles.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="RatingBar" parent="RatingBarStyle">
|
||||
<item name="android:minHeight">80dip</item>
|
||||
<item name="android:maxHeight">80dip</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Sudoku</string>
|
||||
<string name="app_name" translatable="false">Sudoku</string>
|
||||
<string name="win_time">时间:</string>
|
||||
<string name="win_button_text">继续</string>
|
||||
<string name="about_author">作者:</string>
|
||||
|
@ -15,5 +15,66 @@
|
|||
<string name="win_hint">提示:</string>
|
||||
<string name="win_show_game">显示游戏版</string>
|
||||
<string name="win_best_time">新纪录!</string>
|
||||
<string name="about_affiliation"></string>
|
||||
|
||||
<!-- habe hier mal alle rein kopiert, damit du eine art template hast, was noch fehlt -->
|
||||
|
||||
<string name="new_game">Neues Spiel</string>
|
||||
<string name="menu_settings">Einstellungen</string>
|
||||
<string name="menu_highscore">Statistik</string>
|
||||
<string name="menu_main">Hauptmenü</string>
|
||||
<string name="menu_group">Gruppe</string>
|
||||
<string name="menu_help">Hilfe</string>
|
||||
<string name="menu_about">Über</string>
|
||||
<string name="title_activity_settings">Einstellungen</string>
|
||||
<string name="privacy_friendly">Diese App gehört zur Gruppe der Privacy Friendly Apps.</string>
|
||||
<string name="more_info">Mehr Informationen unter:</string>
|
||||
<string name="about_affiliation">In Zusammenarbeit mit:</string>
|
||||
<string name="about_qqwing">Diese App benutzt eine modifizierte Version des QQWing v1.3.4.</string>
|
||||
<string name="generating">Generiere neue Level im Hintergrund…</string>
|
||||
<string name="hint_confirmation">Bist du sicher, dass du einen Hinweis verwenden möchtest? Wenn Hinweise benutzt wurden, kann in dem Spiel keine Bestzeit mehr erreicht werden.</string>
|
||||
<string name="hint_confirmation_confirm">Benutzen</string>
|
||||
<string name="loadgame_delete_confirm">Löschen</string>
|
||||
<string name="hint_usage">Wähle ein gültiges Feld aus und drücke dann auf den Hinweis Knopf um dann das makierte Feld aufzulösen.</string>
|
||||
<string name="loadgame_delete_confirmation">Bist du sicher, dass du den Spielstand löschen möchtest?</string>
|
||||
<string name="menu_continue_game">Spiel Fortsetzen</string>
|
||||
<string name="menu_reset">Zurücksetzen</string>
|
||||
<string name="min_time">Beste Zeit:</string>
|
||||
<string name="number_of_games">Abgeschlossene Spiele:</string>
|
||||
<string name="number_of_hints">Benutzte Hinweise:</string>
|
||||
<string name="pref_automatic_note_deletion">Notizen Löschung</string>
|
||||
<string name="pref_automatic_note_deletion_summary">Automatisches löschen von Notizen, wenn Zahlen in verbundenen Feldern gesetzt werden</string>
|
||||
<string name="pref_group_game">Spiel Einstellungen</string>
|
||||
<string name="pref_group_highlight_selection">Auswahl hervorheben</string>
|
||||
<string name="pref_group_highlight_value">Wert hervorheben</string>
|
||||
<string name="pref_header_game">Spiel</string>
|
||||
<string name="pref_header_highlight">Hervorhebung</string>
|
||||
<string name="pref_highlight_notes">Notizen</string>
|
||||
<string name="pref_highlight_vals">Gleiche Werte</string>
|
||||
<string name="pref_symbols">Symbole</string>
|
||||
<string name="title_activity_load_game">Spiel laden</string>
|
||||
<string name="stats_name">Statistik</string>
|
||||
<string name="reset_stats">Alles zurücksetzen</string>
|
||||
<string name="reset_confirmation_confirm">Zurücksetzen</string>
|
||||
<string name="reset_confirmation">Bist du dir sicher, dass du das komplette Spielfeld zurücksetzen möchtest?</string>
|
||||
<string name="total_of_time">Gesamtspielzeit:</string>
|
||||
<string name="title_activity_help">Hilfe</string>
|
||||
<string name="pref_highlight_connected">Verbundene Felder</string>
|
||||
<string name="help_undo_summary">Macht die letzte Aktion rückgängig</string>
|
||||
<string name="help_undo">Rückgängig</string>
|
||||
<string name="help_permissions_summary">Privacy Friendly Sudoku verwendet keine Berechtigungen.</string>
|
||||
<string name="help_permissions">Berechtigungen</string>
|
||||
<string name="help_notes_summary">Schaltet zwischen Notizen- und Werteingabe hin und her</string>
|
||||
<string name="help_notes">Notizen</string>
|
||||
<string name="help_keyhighlighted_yellow_summary">Zeigt an, ob die korrekte Anzahl des Wertes im Spielfeld vorkommt.</string>
|
||||
<string name="help_keyhighlighted_summary">Zeigt an, dass der Wert ausgewählt ist. Jede Berührung eines Feldes setzt in diesem Modus die Zahl direkt, ohne das Feld vorher auszuwählen.</string>
|
||||
<string name="help_keyboard">Tastatur</string>
|
||||
<string name="help_hint_summary">Zeige die korrekte Lösung für das ausgewählte Feld</string>
|
||||
<string name="help_hint">Hinweis</string>
|
||||
<string name="help_gamefield">Spielfeld</string>
|
||||
<string name="help_do_summary">Stellt die letzte rückgängig gemachte Aktion wieder her</string>
|
||||
<string name="help_do">Wiederherstellen</string>
|
||||
<string name="help_delete_summary">Löscht das ausgewählte Feld</string>
|
||||
<string name="header_help">Hilfe</string>
|
||||
<string name="help_privacyInfo">Privatsphäre Information</string>
|
||||
|
||||
</resources>
|
|
@ -11,7 +11,7 @@
|
|||
<dimen name="text_margin">16dp</dimen>
|
||||
|
||||
|
||||
<dimen name="text_size">20sp</dimen>
|
||||
<dimen name="text_size">25sp</dimen>
|
||||
<dimen name="main_text_difficulty">35sp</dimen>
|
||||
<dimen name="main_button_padding">30dp</dimen>
|
||||
|
||||
|
|
|
@ -29,9 +29,18 @@
|
|||
<item name="android:windowSoftInputMode">adjustPan|stateUnspecified</item>
|
||||
</style>
|
||||
|
||||
<style name="BlueRatingBarSize">
|
||||
|
||||
<style name="RatingBarStyle" parent="@android:style/Widget.RatingBar">
|
||||
<item name="android:progressDrawable">@drawable/ratingbar</item>
|
||||
</style>
|
||||
|
||||
<style name="RatingBar" parent="RatingBarStyle">
|
||||
<item name="android:minHeight">57dip</item>
|
||||
<item name="android:maxHeight">57dip</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- <style name="FontStyle">
|
||||
<item name="android:fontFamily"></item>
|
||||
</style> -->
|
||||
|
|
Loading…
Reference in a new issue