ui: misc ui updates
Do a couple of UI changes I thought of over this week: - Make the detail header text neutral, mostly so I can make it so that the accent only corresponds to active thingsd - Remove the vanity elevation from the cover images. This is mostly to abide by Material Design. - Move the about screen to it's own menu slot on the main fragment.
This commit is contained in:
parent
e946648b24
commit
7e32763662
8 changed files with 21 additions and 49 deletions
|
@ -98,6 +98,12 @@ class HomeFragment : Fragment() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
R.id.action_about -> {
|
||||||
|
parentFragment?.parentFragment?.findNavController()?.navigate(
|
||||||
|
MainFragmentDirections.actionShowAbout()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
R.id.submenu_sorting -> { }
|
R.id.submenu_sorting -> { }
|
||||||
|
|
||||||
// Sorting option was selected, check then and update the mode
|
// Sorting option was selected, check then and update the mode
|
||||||
|
|
|
@ -41,14 +41,6 @@ class SettingsFragment : Fragment() {
|
||||||
val binding = FragmentSettingsBinding.inflate(inflater)
|
val binding = FragmentSettingsBinding.inflate(inflater)
|
||||||
|
|
||||||
binding.settingsToolbar.apply {
|
binding.settingsToolbar.apply {
|
||||||
setOnMenuItemClickListener {
|
|
||||||
findNavController().navigate(
|
|
||||||
SettingsFragmentDirections.actionShowAbout()
|
|
||||||
)
|
|
||||||
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
setNavigationOnClickListener {
|
setNavigationOnClickListener {
|
||||||
findNavController().navigateUp()
|
findNavController().navigateUp()
|
||||||
}
|
}
|
||||||
|
@ -57,7 +49,7 @@ class SettingsFragment : Fragment() {
|
||||||
binding.applyEdge { bars ->
|
binding.applyEdge { bars ->
|
||||||
binding.settingsAppbar.updatePadding(top = bars.top)
|
binding.settingsAppbar.updatePadding(top = bars.top)
|
||||||
|
|
||||||
// The padding + clipToPadding method does not seem to work with a
|
// The padding + clipToPadding method does not work with a
|
||||||
// FragmentContainerView. Do it directly in SettingsListFragment instead.
|
// FragmentContainerView. Do it directly in SettingsListFragment instead.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/settings_toolbar"
|
android:id="@+id/settings_toolbar"
|
||||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||||
app:menu="@menu/menu_settings"
|
|
||||||
app:title="@string/set_title" />
|
app:title="@string/set_title" />
|
||||||
|
|
||||||
</org.oxycblt.auxio.ui.LiftAppBarLayout>
|
</org.oxycblt.auxio.ui.LiftAppBarLayout>
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<group android:checkableBehavior="single">
|
|
||||||
<item
|
|
||||||
android:id="@+id/option_sort_asc"
|
|
||||||
android:title="@string/lbl_sort_asc" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/option_sort_dsc"
|
|
||||||
android:title="@string/lbl_sort_dsc" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/option_sort_artist"
|
|
||||||
android:title="@string/lbl_sort_artist" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/option_sort_album"
|
|
||||||
android:title="@string/lbl_sort_album" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/option_sort_year"
|
|
||||||
android:title="@string/lbl_sort_year" />
|
|
||||||
</group>
|
|
||||||
</menu>
|
|
|
@ -39,4 +39,10 @@
|
||||||
android:icon="@drawable/ic_settings"
|
android:icon="@drawable/ic_settings"
|
||||||
android:title="@string/set_title"
|
android:title="@string/set_title"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_about"
|
||||||
|
android:icon="@drawable/ic_about"
|
||||||
|
android:title="@string/lbl_about"
|
||||||
|
app:showAsAction="never"/>
|
||||||
</menu>
|
</menu>
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
<item
|
|
||||||
android:icon="@drawable/ic_about"
|
|
||||||
android:title="@string/lbl_about"
|
|
||||||
app:showAsAction="always" />
|
|
||||||
</menu>
|
|
|
@ -38,6 +38,13 @@
|
||||||
app:exitAnim="@anim/anim_stationary"
|
app:exitAnim="@anim/anim_stationary"
|
||||||
app:popEnterAnim="@anim/anim_stationary"
|
app:popEnterAnim="@anim/anim_stationary"
|
||||||
app:popExitAnim="@anim/anim_nav_slide_down" />
|
app:popExitAnim="@anim/anim_nav_slide_down" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_show_about"
|
||||||
|
app:destination="@id/about_fragment"
|
||||||
|
app:enterAnim="@anim/anim_nav_slide_up"
|
||||||
|
app:exitAnim="@anim/anim_stationary"
|
||||||
|
app:popEnterAnim="@anim/anim_stationary"
|
||||||
|
app:popExitAnim="@anim/anim_nav_slide_down" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/playback_fragment"
|
android:id="@+id/playback_fragment"
|
||||||
|
@ -66,13 +73,5 @@
|
||||||
android:id="@+id/settings_fragment"
|
android:id="@+id/settings_fragment"
|
||||||
android:name="org.oxycblt.auxio.settings.SettingsFragment"
|
android:name="org.oxycblt.auxio.settings.SettingsFragment"
|
||||||
android:label="fragment_settings"
|
android:label="fragment_settings"
|
||||||
tools:layout="@layout/fragment_settings">
|
tools:layout="@layout/fragment_settings" />
|
||||||
<action
|
|
||||||
android:id="@+id/action_show_about"
|
|
||||||
app:destination="@id/about_fragment"
|
|
||||||
app:enterAnim="@anim/anim_nav_slide_up"
|
|
||||||
app:exitAnim="@anim/anim_stationary"
|
|
||||||
app:popEnterAnim="@anim/anim_stationary"
|
|
||||||
app:popExitAnim="@anim/anim_nav_slide_down" />
|
|
||||||
</fragment>
|
|
||||||
</navigation>
|
</navigation>
|
|
@ -64,7 +64,6 @@
|
||||||
<style name="Widget.Auxio.Image.Full" parent="">
|
<style name="Widget.Auxio.Image.Full" parent="">
|
||||||
<item name="android:layout_width">0dp</item>
|
<item name="android:layout_width">0dp</item>
|
||||||
<item name="android:layout_height">0dp</item>
|
<item name="android:layout_height">0dp</item>
|
||||||
<item name="android:elevation">@dimen/elevation_normal</item>
|
|
||||||
<item name="android:outlineProvider">bounds</item>
|
<item name="android:outlineProvider">bounds</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -152,7 +151,6 @@
|
||||||
<item name="android:textSize">@dimen/text_size_huge</item>
|
<item name="android:textSize">@dimen/text_size_huge</item>
|
||||||
<item name="android:textAlignment">viewStart</item>
|
<item name="android:textAlignment">viewStart</item>
|
||||||
<item name="android:fontFamily">@font/inter_bold</item>
|
<item name="android:fontFamily">@font/inter_bold</item>
|
||||||
<item name="android:textColor">?attr/colorAccent</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Auxio.TextView.Icon" parent="Widget.Auxio.TextView.Base">
|
<style name="Widget.Auxio.TextView.Icon" parent="Widget.Auxio.TextView.Base">
|
||||||
|
|
Loading…
Reference in a new issue