Added dialog and text for dialog for the welcome screen

This commit is contained in:
Gongxter 2016-02-20 15:06:55 +01:00
parent fa54fe0a87
commit d3d8839e3e
7 changed files with 84 additions and 14 deletions

View file

@ -24,6 +24,7 @@ import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RatingBar;
@ -75,9 +76,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
editor.apply();
}
// TODO: remove this after testing
WelcomeDialog welcomeDialog = new WelcomeDialog();
welcomeDialog.show(getFragmentManager(), "WelcomeDialog");
// check if we need to pre generate levels.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -15,18 +15,25 @@
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<bitmap
android:src="@drawable/ic_star_grey_48dp"/>
</item>
<item android:id="@android:id/secondaryProgress">
<bitmap
android:src="@drawable/ic_star_half_black_48dp"
android:src="@drawable/ic_star_grey_48dp"
android:tint="@color/middlegrey" />
</item>
<item android:id="@android:id/progress">
<bitmap
android:src="@drawable/ic_star_blue_48dp" />
android:src="@drawable/ic_star_blue_48dp"
android:tint="@color/colorAccent" />
</item>
<!-- <item android:id="@android:id/background">
<bitmap
android:src="@drawable/ic_star_grey_48dp" />
</item>
<item android:id="@android:id/progress">
<bitmap
android:src="@drawable/ic_star_blue_48dp" />
</item> -->
</layer-list>

View file

@ -124,7 +124,6 @@
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"/>

View file

@ -1,12 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:weightSum="3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome1" />
android:text="@string/welcome" />
<Space
android:layout_width="10dp"
android:layout_height="20dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="@string/field_select_description_headline"
style="@style/Base.DialogWindowTitle.AppCompat"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1.25"
android:weightSum="1"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"/>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:adjustViewBounds="true"
android:layout_weight="1"
android:layout_gravity="center"
android:src="@drawable/icon_default_9x9"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/field_select_description"/>
<Space
android:layout_width="20dp"
android:layout_height="20dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="@string/difficulty_description_headline"
style="@style/Base.DialogWindowTitle.AppCompat"/>
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/difficultyBar"
android:layout_gravity="center_horizontal"
android:clickable="false"
android:numStars="3"
android:rating="1"
android:stepSize="1"
style="@style/RatingBar"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/difficulty_description"/>
</LinearLayout>

View file

@ -87,7 +87,11 @@
<string name="reset_confirmation_confirm">Reset</string>
<!-- ### Welcome Dialog ### -->
<string name="welcome1">Welcome to Privacy Friendly Sudoku.</string>
<string name="welcome">Welcome to Privacy Friendly Sudoku.</string>
<string name="field_select_description">Swipe or press the arrow buttons on the left nd right to change the game filed mode</string>
<string name="field_select_description_headline">Field mode:</string>
<string name="difficulty_description">Press or swipe the stars to change the difficulty</string>
<string name="difficulty_description_headline">Difficulty:</string>
<!-- ### Continue Game ### -->
<string name="loadgame_delete_confirmation">Are you sure you want to delete this save?</string>