ui: improve playback/about UIs
Make playback/about UIs follow the new liftOnScroll and edge-to-edge idioms. This finally allows me to collapse a lot of duplicate code into MainActivity and in general reduce code mess.
This commit is contained in:
@@ -24,13 +24,11 @@
|
||||
android:id="@+id/playback_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fitsSystemWindows="true">
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
android:elevation="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
||||
@@ -24,13 +24,11 @@
|
||||
android:id="@+id/playback_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fitsSystemWindows="true">
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
android:elevation="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
||||
@@ -24,13 +24,11 @@
|
||||
android:id="@+id/playback_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fitsSystemWindows="true">
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
android:elevation="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
||||
@@ -4,21 +4,32 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".settings.AboutFragment">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/about_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
app:title="@string/lbl_about" />
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/about_appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/about_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
app:title="@string/lbl_about" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/about_contents"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
@@ -166,5 +177,5 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -24,7 +24,6 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/home_toolbar"
|
||||
style="@style/Widget.Toolbar"
|
||||
android:elevation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:menu="@menu/menu_home"
|
||||
app:title="@string/info_app_name" />
|
||||
|
||||
@@ -23,13 +23,11 @@
|
||||
android:id="@+id/playback_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurface"
|
||||
android:fitsSystemWindows="true">
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
android:elevation="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/search_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon"
|
||||
android:elevation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:menu="@menu/menu_search"
|
||||
app:title="@string/lbl_search" />
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
<style name="Widget.Toolbar" parent="ThemeOverlay.MaterialComponents.ActionBar">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">?android:attr/actionBarSize</item>
|
||||
<item name="android:background">?attr/colorSurface</item>
|
||||
<item name="android:elevation">@dimen/elevation_normal</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.ToolbarPopup</item>
|
||||
|
||||
<item name="titleTextAppearance">@style/TextAppearance.Toolbar.Header</item>
|
||||
|
||||
Reference in New Issue
Block a user