Fragment transition animations, information dialog, SettingsFragment implements OnCheckedChangeListener

This commit is contained in:
Deniz Düzgören
2019-07-30 16:58:51 +02:00
parent 2fb0506db9
commit b82f595bdf
16 changed files with 138 additions and 343 deletions
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"
android:background="@color/background">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.drawerlayout.widget.DrawerLayout>
+27 -15
View File
@@ -10,20 +10,18 @@
android:id="@+id/appbarlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppThemeLight.AppBarOverlay"
app:elevation="0dp">
android:background="@color/background"
android:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/background"
app:popupTheme="@style/AppThemeLight.PopupOverlay"
app:titleTextColor="@color/accent"
app:contentInsetStart="0dp"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
app:layout_collapseMode="pin"
android:layout_gravity="bottom">
android:elevation="0dp"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@@ -79,22 +77,36 @@
<include layout="@layout/content_main" />
<LinearLayout
android:id="@+id/bottom_sheet_closer"
<View
android:id="@+id/bottom_nav_divider"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:orientation="vertical"
android:clickable="true"
android:focusable="true"/>
android:layout_height="1dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_anchor="@+id/bottom_nav"
android:layout_gravity="top"
android:background="@color/lighthintcolor"
android:clickable="false"
android:focusable="false"/>
<include layout="@layout/bottom_sheet" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginBottom="0dp"
app:elevation="0dp"
android:layout_gravity="bottom"
app:menu="@menu/nav_items"
android:background="@color/background"
app:itemIconTint="@color/bottom_nav_color"
app:itemTextColor="@color/bottom_nav_color"
app:itemRippleColor="@color/accent"/>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/coordination"
android:layout_width="match_parent"
android:layout_height="80dp"
app:layout_anchor="@+id/bottom_sheet"
app:layout_anchor="@+id/bottom_nav"
android:layout_gravity="top"
android:clickable="false"
android:focusable="false"/>
-81
View File
@@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:orientation="vertical"
android:paddingTop="0dp"
app:behavior_hideable="false"
app:behavior_peekHeight="56dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<View
android:id="@+id/bottom_nav_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_anchor="@+id/bottom_sheet"
android:layout_gravity="top"
android:background="@color/lighthintcolor"
android:clickable="false"
android:focusable="false"/>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginBottom="0dp"
app:elevation="0dp"
app:layout_anchor="@+id/bottom_sheet"
android:layout_gravity="bottom"
app:menu="@menu/nav_items"
android:background="@color/background"
app:itemIconTint="@color/bottom_nav_color"
app:itemTextColor="@color/bottom_nav_color"
app:itemRippleColor="@color/accent"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/bottom_sheet_linear"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background">
<TextView
android:id="@+id/bottom_sheet_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_information"
android:drawableTint="@color/textcolor"
android:paddingStart="16dp"
android:drawablePadding="8dp"
android:gravity="top|start"
android:text="@string/information"
android:textSize="16sp"
android:textColor="@color/textcolor"/>
<TextView
android:id="@+id/bottom_sheet_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:gravity="top|start"
android:text="@string/noinfo"
android:textSize="12sp"
android:textColor="@color/textcolor"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
+3 -37
View File
@@ -143,40 +143,6 @@
app:layout_constraintStart_toStartOf="@+id/txtDark"
app:layout_constraintTop_toTopOf="@+id/txtDark" />
<!-- a-->
<TextView
android:id="@+id/txtHideInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/showinfo"
android:textColor="@color/textcolor"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@+id/txtRestart"
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
<TextView
android:id="@+id/txtHideInfo2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/swipeindependent"
android:textColor="@color/hintcolor"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@+id/txtHideInfo"
app:layout_constraintTop_toBottomOf="@+id/txtHideInfo" />
<Switch
android:id="@+id/switchHideInfo"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:gravity="end|center"
app:layout_constraintBottom_toBottomOf="@+id/txtHideInfo2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/txtHideInfo"
app:layout_constraintTop_toTopOf="@+id/txtHideInfo" />
<!-- a-->
<TextView
android:id="@+id/txtCustomiseColours1"
android:layout_width="wrap_content"
@@ -185,8 +151,8 @@
android:text="@string/customisecolor1"
android:textColor="@color/textcolor"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@+id/txtHideInfo2"
app:layout_constraintTop_toBottomOf="@+id/txtHideInfo2" />
app:layout_constraintStart_toStartOf="@+id/txtRestart"
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
<TextView
android:id="@+id/txtCustomiseColours2"
@@ -213,7 +179,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtHideInfo2" />
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
</androidx.constraintlayout.widget.ConstraintLayout>
+1 -1
View File
@@ -13,7 +13,7 @@
android:layout_marginEnd="8dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
app:cardElevation="1dp">
app:cardElevation="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
+2 -1
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/lightbackground">
<TextView
android:id="@+id/textviewtitle"