Adjust the alignment of the circle check box in the MainActivity layouts

This commit is contained in:
uykek 2020-08-30 11:14:36 +02:00
parent c886c6cae3
commit d63f44b5e6
7 changed files with 248 additions and 209 deletions

View file

@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="35dp"
android:height="35dp"
android:width="37dp"
android:height="37dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path

View file

@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="35dp"
android:height="35dp"
android:width="37dp"
android:height="37dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path

View file

@ -1,5 +1,4 @@
<?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"
@ -24,8 +23,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="parent"
tools:layout_editor_absoluteY="433dp">
app:layout_constraintTop_toBottomOf="parent">
</androidx.viewpager.widget.ViewPager>
@ -76,7 +74,6 @@
android:id="@+id/floatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="128dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:onClick="onClick"
@ -88,32 +85,21 @@
app:layout_constraintVertical_bias="1.0"
app:srcCompat="@android:drawable/ic_media_play" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout11"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:weightSum="5"
app:layout_constraintBottom_toTopOf="@+id/view3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appbar">
<ImageView
android:id="@+id/statistic_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:adjustViewBounds="true"
android:src="@drawable/icon_default_9x9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/view3"
app:layout_constraintEnd_toStartOf="@id/view"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/appbar" />
<TextView
@ -153,13 +139,15 @@
<View
android:id="@+id/view"
android:layout_width="1dp"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:background="?attr/colorPrimary"
android:foregroundGravity="center_vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/view3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appbar" />
<TextView
@ -189,7 +177,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/number_of_completed_games"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/view3"
app:layout_constraintEnd_toEndOf="@+id/textView4"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/textView4"
@ -211,7 +201,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/total_of_time"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/view3"
app:layout_constraintEnd_toEndOf="@+id/textView4"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/textView4"
@ -223,16 +215,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/view3"
app:layout_constraintEnd_toEndOf="@+id/textView6"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/textView4"
app:layout_constraintTop_toBottomOf="@+id/textView6"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ListView
android:id="@+id/sudoku_list"
android:layout_width="wrap_content"

View file

@ -102,30 +102,44 @@
android:text="@string/difficulty_easy"
android:textSize="@dimen/main_text_difficulty"/>
<LinearLayout
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:gravity="center_vertical">
<CheckBox
android:id="@+id/circleButton"
android:layout_width="35dp"
android:layout_height="35dp"
android:button="@drawable/create_game_src" />
<RatingBar
style="@style/CheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:button="@drawable/create_game_src"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/difficultyBar"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.65" />
<RatingBar
android:id="@+id/difficultyBar"
android:layout_gravity="center_horizontal"
style="@style/RatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="41dp"
android:layout_marginLeft="41dp"
android:clickable="true"
android:numStars="3"
android:rating="1"
android:stepSize="1"
style="@style/RatingBar"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:textColor="?attr/lightestFontColor"

View file

@ -104,31 +104,44 @@
android:text="@string/difficulty_easy"
android:textSize="@dimen/main_text_difficulty"/>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:gravity="center_vertical">
<CheckBox
android:id="@+id/circleButton"
android:layout_width="35dp"
android:layout_height="35dp"
android:button="@drawable/create_game_src" />
<RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="3dp"
android:layout_marginRight="3dp"
android:button="@drawable/create_game_src"
android:scaleX="0.75"
android:scaleY="0.75"
app:layout_constraintBottom_toBottomOf="@+id/difficultyBar"
app:layout_constraintEnd_toStartOf="@+id/difficultyBar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/difficultyBar" />
<RatingBar
android:id="@+id/difficultyBar"
android:layout_gravity="center_horizontal"
style="@style/RatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
android:clickable="true"
android:numStars="3"
android:rating="1"
android:stepSize="1"
android:scaleX="0.75"
android:scaleY="0.75"
style="@style/RatingBar"/>
</LinearLayout>
android:stepSize="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:textColor="?attr/lightestFontColor"

View file

@ -9,9 +9,6 @@
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"
@ -82,8 +79,7 @@
android:onClick="onClick"/>
</RelativeLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/scroller"
@ -107,34 +103,46 @@
android:text="@string/difficulty_easy"
android:textSize="@dimen/main_text_difficulty"/>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/linearLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:gravity="center_vertical">
<CheckBox
android:id="@+id/circleButton"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="center_horizontal"
android:button="@drawable/create_game_src" />
<RatingBar
style="@style/CheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:button="@drawable/create_game_src"
app:layout_constraintBottom_toBottomOf="@+id/difficultyBar"
app:layout_constraintEnd_toStartOf="@+id/difficultyBar"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/difficultyBar"
app:layout_constraintVertical_bias="0.65" />
<RatingBar
android:id="@+id/difficultyBar"
android:layout_gravity="center_horizontal"
style="@style/RatingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="41dp"
android:layout_marginLeft="41dp"
android:clickable="true"
android:numStars="3"
android:rating="1"
android:padding="0dp"
android:layout_margin="0dp"
android:stepSize="1"
android:paddingTop="70dp"
style="@style/RatingBar"/>
android:rating="1"
android:stepSize="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:textColor="?attr/lightestFontColor"
android:layout_width="match_parent"

View file

@ -9,7 +9,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
tools:context="tu_darmstadt.sudoku.ui.MainActivity"
android:layout_height="match_parent"
@ -80,8 +79,7 @@
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"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="6"
@ -103,28 +101,43 @@
android:text="@string/difficulty_easy"
android:textSize="@dimen/main_text_difficulty"/>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
android:id="@+id/linearLayout4">
<CheckBox
android:id="@+id/circleButton"
android:layout_width="35dp"
android:layout_height="35dp"
android:button="@drawable/create_game_src" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
android:layout_marginBottom="7dp"
android:button="@drawable/create_game_src"
app:layout_constraintBottom_toBottomOf="@+id/difficultyBar"
app:layout_constraintEnd_toStartOf="@+id/difficultyBar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/difficultyBar"
app:layout_constraintVertical_bias="0.65" />
<RatingBar
android:id="@+id/difficultyBar"
style="@style/RatingBar"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_marginStart="41dp"
android:layout_marginLeft="41dp"
android:clickable="true"
android:numStars="3"
android:rating="0.5"
android:stepSize="1" />
</LinearLayout>
android:stepSize="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:textColor="?attr/lightestFontColor"