diff options
Diffstat (limited to 'src/android/app/src/main/res/layout')
3 files changed, 171 insertions, 40 deletions
diff --git a/src/android/app/src/main/res/layout/activity_settings.xml b/src/android/app/src/main/res/layout/activity_settings.xml index 14ae83b04..8a026a30a 100644 --- a/src/android/app/src/main/res/layout/activity_settings.xml +++ b/src/android/app/src/main/res/layout/activity_settings.xml @@ -1,42 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.coordinatorlayout.widget.CoordinatorLayout - android:id="@+id/coordinator_main" +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/constraint_settings" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/colorSurface"> - <com.google.android.material.appbar.AppBarLayout - android:id="@+id/appbar_settings" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:fitsSystemWindows="true" - app:elevation="0dp"> - - <com.google.android.material.appbar.CollapsingToolbarLayout - style="?attr/collapsingToolbarLayoutMediumStyle" - android:id="@+id/toolbar_settings_layout" - android:layout_width="match_parent" - android:layout_height="?attr/collapsingToolbarLayoutMediumSize" - app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"> - - <com.google.android.material.appbar.MaterialToolbar - android:id="@+id/toolbar_settings" - android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - app:layout_collapseMode="pin" /> - - </com.google.android.material.appbar.CollapsingToolbarLayout> - - </com.google.android.material.appbar.AppBarLayout> - - <FrameLayout - android:id="@+id/frame_content" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_marginHorizontal="12dp" - app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + <androidx.fragment.app.FragmentContainerView + android:id="@+id/fragment_container" + android:name="androidx.navigation.fragment.NavHostFragment" + android:layout_width="0dp" + android:layout_height="0dp" + app:defaultNavHost="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:layout="@layout/fragment_settings" /> <View android:id="@+id/navigation_bar_shade" @@ -45,6 +27,8 @@ android:background="@android:color/transparent" android:clickable="false" android:focusable="false" - android:layout_gravity="bottom|center_horizontal" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> -</androidx.coordinatorlayout.widget.CoordinatorLayout> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/src/android/app/src/main/res/layout/fragment_settings.xml b/src/android/app/src/main/res/layout/fragment_settings.xml index 167720347..ebedbf1ec 100644 --- a/src/android/app/src/main/res/layout/fragment_settings.xml +++ b/src/android/app/src/main/res/layout/fragment_settings.xml @@ -1,14 +1,41 @@ <?xml version="1.0" encoding="utf-8"?> -<FrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/coordinator_main" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:background="?attr/colorSurface"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_settings" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fitsSystemWindows="true" + app:elevation="0dp"> + + <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/toolbar_settings_layout" + style="?attr/collapsingToolbarLayoutMediumStyle" + android:layout_width="match_parent" + android:layout_height="?attr/collapsingToolbarLayoutMediumSize" + app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"> + + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar_settings" + android:layout_width="match_parent" + android:layout_height="?attr/actionBarSize" + app:layout_collapseMode="pin" + app:navigationIcon="@drawable/ic_back" /> + + </com.google.android.material.appbar.CollapsingToolbarLayout> + + </com.google.android.material.appbar.AppBarLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/list_settings" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/colorSurface" - android:clipToPadding="false" /> + android:clipToPadding="false" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> -</FrameLayout> +</androidx.coordinatorlayout.widget.CoordinatorLayout> diff --git a/src/android/app/src/main/res/layout/fragment_settings_search.xml b/src/android/app/src/main/res/layout/fragment_settings_search.xml new file mode 100644 index 000000000..c779ed2fc --- /dev/null +++ b/src/android/app/src/main/res/layout/fragment_settings_search.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <RelativeLayout + android:id="@+id/relativeLayout" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/divider"> + + <LinearLayout + android:id="@+id/no_results_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:orientation="vertical"> + + <ImageView + android:id="@+id/icon_no_results" + android:layout_width="match_parent" + android:layout_height="80dp" + android:src="@drawable/ic_search" /> + + <com.google.android.material.textview.MaterialTextView + android:id="@+id/notice_text" + style="@style/TextAppearance.Material3.TitleLarge" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:paddingTop="8dp" + android:text="@string/search_settings" + tools:visibility="visible" /> + + </LinearLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/settings_list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:clipToPadding="false" /> + + </RelativeLayout> + + <FrameLayout + android:id="@+id/frame_search" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipToPadding="false" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/search_background" + style="?attr/materialCardViewFilledStyle" + android:layout_width="match_parent" + android:layout_height="56dp" + app:cardCornerRadius="28dp"> + + <LinearLayout + android:id="@+id/search_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginEnd="56dp" + android:orientation="horizontal"> + + <Button + android:id="@+id/back_button" + style="?attr/materialIconButtonFilledTonalStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginStart="8dp" + app:backgroundTint="@android:color/transparent" + app:icon="@drawable/ic_back" /> + + <EditText + android:id="@+id/search_text" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/transparent" + android:hint="@string/search_settings" + android:imeOptions="flagNoFullscreen" + android:inputType="text" + android:maxLines="1" /> + + </LinearLayout> + + <Button + android:id="@+id/clear_button" + style="?attr/materialIconButtonFilledTonalStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical|end" + android:layout_marginEnd="8dp" + android:visibility="invisible" + app:backgroundTint="@android:color/transparent" + app:icon="@drawable/ic_clear" + tools:visibility="visible" /> + + </com.google.android.material.card.MaterialCardView> + + </FrameLayout> + + <com.google.android.material.divider.MaterialDivider + android:id="@+id/divider" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/frame_search" /> + +</androidx.constraintlayout.widget.ConstraintLayout> |