aa4c615598
Fixes #51, Fixes #38, Fixes #8
171 lines
No EOL
7.8 KiB
XML
171 lines
No EOL
7.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout_main"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="match_parent"
|
|
android:fitsSystemWindows="true"
|
|
tools:openDrawer="start"
|
|
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">
|
|
|
|
<androidx.coordinatorlayout.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">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:id="@+id/appbar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:theme="@style/AppTheme.AppBarOverlay">
|
|
|
|
<androidx.appcompat.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">
|
|
|
|
</androidx.appcompat.widget.Toolbar>
|
|
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:weightSum="2"
|
|
android:id="@+id/main_content"
|
|
android:orientation="horizontal"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="0px"
|
|
android:layout_height="match_parent"
|
|
android:layoutDirection="ltr"
|
|
android:layout_weight="1">
|
|
|
|
<androidx.viewpager.widget.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"
|
|
app:srcCompat="@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:padding="@dimen/activity_horizontal_margin"
|
|
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_alignParentEnd="true"
|
|
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="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_below="@+id/scroller"
|
|
android:layout_weight="1"
|
|
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="0"
|
|
android:divider="#000"
|
|
android:baselineAligned="false"
|
|
android:gravity="center_horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/difficultyText"
|
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
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:layout_marginTop="@dimen/activity_vertical_margin"
|
|
android:id="@+id/difficultyBar"
|
|
android:layout_gravity="center_horizontal"
|
|
android:clickable="true"
|
|
android:numStars="3"
|
|
android:rating="1"
|
|
android:stepSize="1"
|
|
style="@style/RatingBar"/>
|
|
|
|
<Button
|
|
android:textColor="@color/white"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="20dp"
|
|
android:layout_marginLeft="40dp"
|
|
android:layout_marginRight="40dp"
|
|
android:text="@string/new_game"
|
|
android:textStyle="normal"
|
|
android:textSize="@dimen/text_size"
|
|
android:id="@+id/playButton"
|
|
android:layout_gravity="center_horizontal"
|
|
android:onClick="onClick"
|
|
android:capitalize="none"
|
|
android:clickable="false"
|
|
android:elevation="10dp"
|
|
android:background="@drawable/standalone_button"/>
|
|
|
|
<Button
|
|
android:textColor="@color/white"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
android:layout_marginLeft="40dp"
|
|
android:layout_marginRight="40dp"
|
|
android:text="@string/menu_continue_game"
|
|
android:textStyle="normal"
|
|
android:textSize="@dimen/text_size"
|
|
android:id="@+id/continueButton"
|
|
android:layout_gravity="center_horizontal"
|
|
android:onClick="onClick"
|
|
android:capitalize="none"
|
|
android:clickable="true"
|
|
android:background="@drawable/standalone_button"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
<com.google.android.material.navigation.NavigationView
|
|
android:id="@+id/nav_view_main"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="start"
|
|
android:fitsSystemWindows="true"
|
|
android:background="@color/white"
|
|
app:menu="@menu/menu_drawer_main"
|
|
app:headerLayout="@layout/nav_header" />
|
|
|
|
</androidx.drawerlayout.widget.DrawerLayout> |