ui: completely rework icon management
Completely rework the way Auxio handles icons. This is mostly two changes: 1. Removing ImageButton/StyledImageButton for MaterialButton. This is done by abusing MaterialButton's theming options to make it only show an icon. 2. Standardizing icon sizes into small, medium, and large categories. Small is the default, Medium and Large are for edge-cases like the playback icons which look horrible at 24dp. 3. Abusing the Toolbar to make it follow Material 3 guidelines. This mostly involved removing the strange icon sizing and correctly padding the view. 4. Reworking the playback bar to use more, smaller icons, making it more like a Toolbar in the process (which I like).
This commit is contained in:
@@ -15,9 +15,11 @@
|
||||
app:liftOnScroll="true"
|
||||
app:liftOnScrollTargetViewId="@id/detail_recycler">
|
||||
|
||||
<!-- FIXME: Not every detail view has actions -->
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/detail_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon" />
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Actions" />
|
||||
|
||||
</org.oxycblt.auxio.detail.DetailAppBarLayout>
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/home_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Toolbar.Actions"
|
||||
app:menu="@menu/menu_home"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:title="@string/info_app_name" />
|
||||
@@ -30,6 +32,7 @@
|
||||
</org.oxycblt.auxio.ui.EdgeAppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||
@@ -98,7 +101,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle_all"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
android:src="@drawable/ic_shuffle" />
|
||||
|
||||
</org.oxycblt.auxio.home.EdgeFabContainer>
|
||||
|
||||
|
||||
@@ -43,14 +43,25 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
||||
tools:text="Artist Name / Album Name" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Auxio.Button.Icon.Medium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_next"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Medium"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down.Actions"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
@@ -70,26 +70,26 @@
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_change_repeat"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:icon="@drawable/ic_repeat"
|
||||
app:iconTint="@color/sel_accented"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_prev"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_prev" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_prev"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_repeat"
|
||||
@@ -108,31 +108,27 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:src="@drawable/ic_play" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<Button
|
||||
android:id="@+id/playback_skip_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_skip_next"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_shuffle"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageButton
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:iconTint="@color/sel_accented"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:src="@drawable/ic_shuffle_state"
|
||||
app:hasIndicator="true"
|
||||
app:iconSize="@dimen/size_icon_large"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/search_toolbar"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Actions"
|
||||
app:menu="@menu/menu_search">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingBottom="@dimen/spacing_small"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:padding="@dimen/spacing_small"
|
||||
android:theme="@style/ThemeOverlay.Accent">
|
||||
|
||||
<ImageButton
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/accent"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/ui_accent_circle"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_check"
|
||||
app:icon="@drawable/ic_check"
|
||||
app:iconTint="?attr/colorSurface"
|
||||
tools:backgroundTint="?attr/colorPrimary"
|
||||
tools:ignore="ContentDescription, SpeakableTextPresentCheck" />
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excluded_path"
|
||||
@@ -25,20 +24,14 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="/storage/emulated/0/directory" />
|
||||
|
||||
<ImageButton
|
||||
<Button
|
||||
android:id="@+id/excluded_clear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:layout_marginEnd="@dimen/spacing_button_dialog"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:contentDescription="@string/desc_blacklist_delete"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:paddingBottom="@dimen/spacing_small"
|
||||
android:src="@drawable/ic_delete"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -61,19 +61,14 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/song_name"
|
||||
tools:text="Artist / Album" />
|
||||
|
||||
<ImageView
|
||||
<Button
|
||||
android:id="@+id/song_drag_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:contentDescription="@string/desc_queue_handle"
|
||||
android:focusable="true"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_handle"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
app:icon="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_album_cover"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_album_cover" />
|
||||
|
||||
@@ -16,18 +16,14 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Songs" />
|
||||
|
||||
<ImageButton
|
||||
<Button
|
||||
android:id="@+id/header_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
android:contentDescription="@string/lbl_sort"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:src="@drawable/ic_sort"
|
||||
android:layout_marginEnd="@dimen/spacing_tiny"
|
||||
app:icon="@drawable/ic_sort"
|
||||
app:layout_constraintBottom_toTopOf="@id/header_divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_small"
|
||||
android:layout_marginBottom="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
@@ -28,20 +29,14 @@
|
||||
tools:ignore="RtlSymmetry,contentDescription"
|
||||
tools:text="Artist" />
|
||||
|
||||
<ImageView
|
||||
<Button
|
||||
android:id="@+id/tab_drag_handle"
|
||||
android:layout_marginEnd="@dimen/spacing_button_dialog"
|
||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/desc_tab_handle"
|
||||
android:focusable="true"
|
||||
android:minWidth="@dimen/size_btn_small"
|
||||
android:minHeight="@dimen/size_btn_small"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_medium"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_handle"
|
||||
app:icon="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tab_icon" />
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
android:src="@drawable/ic_shuffle" />
|
||||
|
||||
</android.widget.LinearLayout>
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:src="@drawable/ic_shuffle_state" />
|
||||
android:src="@drawable/ic_shuffle" />
|
||||
|
||||
</android.widget.LinearLayout>
|
||||
</android.widget.RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user