mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 08:49:55 +00:00
Improve: Remove unused parameters
Improve: Invert Corner rounding for app bar to fix tear out
This commit is contained in:
parent
878dde983d
commit
8b60fe4f98
7
src/main/res/drawable/appbar_background.xml
Normal file
7
src/main/res/drawable/appbar_background.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="?colorSurface" />
|
||||||
|
<corners
|
||||||
|
android:bottomRightRadius="@dimen/shape_large_corner"
|
||||||
|
android:bottomLeftRadius="@dimen/shape_large_corner" />
|
||||||
|
</shape>
|
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<solid android:color="?android:colorBackground" />
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="@dimen/shape_large_corner"
|
|
||||||
android:topRightRadius="@dimen/shape_large_corner" />
|
|
||||||
</shape>
|
|
@ -8,14 +8,12 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="?colorSurface">
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/coordinator"
|
android:id="@+id/coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="?colorSurface"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
@ -23,8 +21,7 @@
|
|||||||
android:id="@+id/appbar_layout"
|
android:id="@+id/appbar_layout"
|
||||||
style="?attr/appBarLayoutStyle"
|
style="?attr/appBarLayoutStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@android:color/transparent">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
@ -47,8 +44,6 @@
|
|||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/background_recycler_bottom"
|
|
||||||
android:backgroundTint="?android:colorBackground"
|
|
||||||
app:defaultNavHost="true"
|
app:defaultNavHost="true"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
app:navGraph="@navigation/navigation_graph_main" />
|
app:navGraph="@navigation/navigation_graph_main" />
|
||||||
@ -56,14 +51,9 @@
|
|||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottom_navigation"
|
android:id="@+id/bottom_navigation"
|
||||||
style="@style/Widget.Material3.BottomNavigationView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
|
||||||
app:itemActiveIndicatorStyle="@style/Widget.Material3.BottomNavigationView.ActiveIndicator"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/coordinator"
|
app:layout_constraintTop_toBottomOf="@id/coordinator"
|
||||||
app:menu="@menu/navigation_menu_main" />
|
app:menu="@menu/navigation_menu_main" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -8,14 +8,12 @@
|
|||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="?colorSurface">
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/coordinator"
|
android:id="@+id/coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="?colorSurface"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
@ -23,8 +21,7 @@
|
|||||||
android:id="@+id/appbar_layout"
|
android:id="@+id/appbar_layout"
|
||||||
style="?attr/appBarLayoutStyle"
|
style="?attr/appBarLayoutStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@android:color/transparent">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
android:id="@+id/collapsing_toolbar"
|
android:id="@+id/collapsing_toolbar"
|
||||||
@ -46,8 +43,6 @@
|
|||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/background_recycler_bottom"
|
|
||||||
android:backgroundTint="?android:colorBackground"
|
|
||||||
app:defaultNavHost="true"
|
app:defaultNavHost="true"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
app:navGraph="@navigation/navigation_graph_prefs" />
|
app:navGraph="@navigation/navigation_graph_prefs" />
|
||||||
@ -55,14 +50,9 @@
|
|||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottom_navigation"
|
android:id="@+id/bottom_navigation"
|
||||||
style="@style/Widget.Material3.BottomNavigationView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
|
||||||
app:itemActiveIndicatorStyle="@style/Widget.Material3.BottomNavigationView.ActiveIndicator"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/coordinator"
|
app:layout_constraintTop_toBottomOf="@id/coordinator"
|
||||||
app:menu="@menu/navigation_menu_prefs" />
|
app:menu="@menu/navigation_menu_prefs" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -118,6 +118,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.AppBarLayout" parent="Widget.Material3.AppBarLayout">
|
<style name="Theme.AppBarLayout" parent="Widget.Material3.AppBarLayout">
|
||||||
|
<item name="android:background">@drawable/appbar_background</item>
|
||||||
<item name="android:backgroundTint">?attr/colorSurface</item>
|
<item name="android:backgroundTint">?attr/colorSurface</item>
|
||||||
<item name="android:fitsSystemWindows">true</item>
|
<item name="android:fitsSystemWindows">true</item>
|
||||||
</style>
|
</style>
|
||||||
@ -131,6 +132,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Toolbar" parent="Widget.Material3.Toolbar.Surface">
|
<style name="Theme.Toolbar" parent="Widget.Material3.Toolbar.Surface">
|
||||||
|
<item name="android:background">@drawable/appbar_background</item>
|
||||||
<item name="layout_collapseMode">pin</item>
|
<item name="layout_collapseMode">pin</item>
|
||||||
<item name="android:backgroundTint">?attr/colorSurface</item>
|
<item name="android:backgroundTint">?attr/colorSurface</item>
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user