all: clean up resources

Clean up resource implementations, removing useless attributes and
simplifying layouts.
This commit is contained in:
OxygenCobalt
2022-07-12 13:13:08 -06:00
parent ae00a308fe
commit ce7dd48f02
39 changed files with 110 additions and 149 deletions
@@ -8,7 +8,5 @@
android:paddingStart="@dimen/spacing_medium"
android:paddingEnd="@dimen/spacing_medium"
app:layoutManager="org.oxycblt.auxio.ui.accent.AccentGridLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/accent_cancel"
app:layout_constraintTop_toBottomOf="@+id/accent_header"
tools:itemCount="16"
tools:listitem="@layout/item_accent" />
-2
View File
@@ -6,7 +6,5 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/accent_cancel"
app:layout_constraintTop_toBottomOf="@+id/accent_header"
tools:itemCount="5"
tools:listitem="@layout/item_tab" />
+4 -5
View File
@@ -84,9 +84,9 @@
android:id="@+id/about_version_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:contentDescription="@string/lbl_version"
android:src="@drawable/ic_about_24"
android:layout_marginStart="@dimen/spacing_medium"
app:layout_constraintBottom_toBottomOf="@+id/about_version"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/about_version_title" />
@@ -95,8 +95,8 @@
android:id="@+id/about_version_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginTop="@dimen/spacing_medium"
android:text="@string/lbl_version"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:layout_constraintBottom_toTopOf="@+id/about_version"
@@ -107,21 +107,20 @@
android:id="@+id/about_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_medium"
android:textAppearance="@style/TextAppearance.Auxio.BodySmall"
app:layout_constraintStart_toStartOf="@+id/about_version_title"
app:layout_constraintTop_toBottomOf="@+id/about_version_title"
android:layout_marginBottom="@dimen/spacing_medium"
tools:text="16.16.16" />
<TextView
android:id="@+id/about_code"
style="@style/Widget.Auxio.TextView.Icon.Clickable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/lbl_code"
android:layout_marginTop="@dimen/spacing_medium"
android:text="@string/lbl_code"
app:drawableStartCompat="@drawable/ic_code_24"
app:layout_constraintBottom_toTopOf="@+id/about_faq"
app:layout_constraintEnd_toEndOf="parent"
+1 -1
View File
@@ -17,8 +17,8 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/detail_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationIcon="@drawable/ic_back_24" />
</org.oxycblt.auxio.detail.DetailAppBarLayout>
+5 -4
View File
@@ -35,9 +35,9 @@
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"
android:animateLayoutChanges="true"
android:clipToPadding="false">
android:clipToPadding="false"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/home_pager"
@@ -51,8 +51,9 @@
android:id="@+id/home_indexing_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/spacing_medium"
android:layout_gravity="center">
android:visibility="invisible">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
@@ -92,10 +93,10 @@
android:id="@+id/home_indexing_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/lbl_retry"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
android:text="@string/lbl_retry"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_indexing_status" />
@@ -7,12 +7,12 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playback_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:navigationIcon="@drawable/ic_down_24"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/menu_playback"
app:navigationIcon="@drawable/ic_down_24"
app:title="@string/lbl_playback"
tools:subtitle="@string/lbl_all_songs" />
+3 -3
View File
@@ -14,10 +14,10 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/queue_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:navigationIcon="@drawable/ic_down_24"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
app:navigationIcon="@drawable/ic_down_24"
app:title="@string/lbl_queue" />
</org.oxycblt.auxio.ui.coordinator.EdgeAppBarLayout>
+5 -5
View File
@@ -10,12 +10,12 @@
app:liftOnScroll="true"
app:liftOnScrollTargetViewId="@id/search_recycler">
<com.google.android.material.appbar.MaterialToolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/search_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:navigationIcon="@drawable/ic_back_24"
app:menu="@menu/menu_search">
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/menu_search"
app:navigationIcon="@drawable/ic_back_24">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
@@ -15,9 +15,9 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/settings_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
app:navigationIcon="@drawable/ic_back_24"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationIcon="@drawable/ic_back_24"
app:title="@string/set_title" />
</org.oxycblt.auxio.ui.coordinator.EdgeAppBarLayout>
+2 -2
View File
@@ -7,8 +7,8 @@
<!--
We don't want to show an album cover, but we still want the spacing of this song
to be alike to other songs. So, add a pastel-ish background to each track number
view. The way we do this is odd, but it's designed this way.
to be alike to other songs. So, the imageview retains it's default tonal color,
with us only overlaying the track number (and other elements) onto it.
-->
<org.oxycblt.auxio.image.ImageGroup
+4 -2
View File
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/spacing_medium">
<org.oxycblt.auxio.image.StyledImageView
@@ -21,10 +22,11 @@
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/disc_item"
app:layout_constraintTop_toTopOf="parent"
tools:text="Disc 16" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
+4 -6
View File
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@android:id/title"
style="@style/Widget.Auxio.TextView.Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/header_divider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Songs" />
<com.google.android.material.divider.MaterialDivider
@@ -21,4 +19,4 @@
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
+6 -11
View File
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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="wrap_content">
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/dir_path"
@@ -13,15 +14,12 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_weight="1"
android:gravity="center"
android:maxLines="@null"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/dir_delete"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="/storage/emulated/0/directory" />
<Button
@@ -32,9 +30,6 @@
android:layout_marginEnd="@dimen/spacing_mid_medium"
android:contentDescription="@string/desc_music_dir_delete"
app:icon="@drawable/ic_delete_24"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
+12 -19
View File
@@ -1,34 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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"
style="@style/Widget.Auxio.ItemLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp">
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
android:paddingTop="@dimen/spacing_small"
android:paddingBottom="@dimen/spacing_small">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/tab_icon"
style="@style/Widget.Material3.CompoundButton.CheckBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginTop="@dimen/spacing_small"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_small"
android:layout_marginEnd="@dimen/spacing_tiny"
android:layout_weight="1"
android:clickable="false"
android:focusable="false"
android:paddingStart="@dimen/spacing_medium"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:buttonCompat="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tab_drag_handle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlSymmetry,contentDescription"
tools:text="Artist" />
tools:text="Artists" />
<Button
android:id="@+id/tab_drag_handle"
@@ -37,9 +33,6 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/spacing_mid_medium"
android:contentDescription="@string/desc_tab_handle"
app:icon="@drawable/ic_handle_24"
app:layout_constraintBottom_toBottomOf="@+id/tab_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tab_icon" />
app:icon="@drawable/ic_handle_24" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
+1 -8
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="wrap_content">
@@ -11,11 +10,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_medium"
android:valueFrom="0"
android:valueTo="1"
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" />
android:valueTo="1" />
<TextView
android:id="@+id/seek_bar_position"
@@ -37,8 +32,6 @@
android:layout_marginBottom="@dimen/spacing_tiny"
android:textAppearance="@style/TextAppearance.Auxio.LabelMedium"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
tools:text="16:16" />
</FrameLayout>
+2 -2
View File
@@ -4,8 +4,8 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="?attr/colorSurface"
android:background="@drawable/ui_widget_bg"
android:backgroundTint="?attr/colorSurface"
android:theme="@style/Theme.Widget">
<!--
@@ -108,7 +108,7 @@
<android.widget.ImageButton
android:id="@+id/widget_play_pause"
style="@style/Widget.Auxio.FloatingActionButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget.PlayPause"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_play_pause"
+2 -2
View File
@@ -4,8 +4,8 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="?attr/colorSurface"
android:background="@drawable/ui_widget_bg"
android:backgroundTint="?attr/colorSurface"
android:theme="@style/Theme.Widget">
<!--
@@ -93,7 +93,7 @@
<android.widget.ImageButton
android:id="@+id/widget_play_pause"
style="@style/Widget.Auxio.FloatingActionButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget.PlayPause"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_play_pause"
+2 -2
View File
@@ -8,7 +8,7 @@
android:theme="@style/Theme.Widget">
<!--
For most widget forms to work, we need to scale the ImageView across a 1:1 aspect ratio.
For our widgets to work, we need to scale the ImageView across a 1:1 aspect ratio.
However, since we are working with a RemoteViews instance, we can't just use ConstraintLayout
to achieve this. We can use RelativeLayout, but there's no way to force an aspect ratio with
that layout. However, if we create an invisible ImageView that contains a massive fixed-size
@@ -81,7 +81,7 @@
<android.widget.ImageButton
android:id="@+id/widget_play_pause"
style="@style/Widget.Auxio.FloatingActionButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget.PlayPause"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_play_pause"
+2 -2
View File
@@ -4,8 +4,8 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="?attr/colorSurface"
android:background="@drawable/ui_widget_bg"
android:backgroundTint="?attr/colorSurface"
android:baselineAligned="false"
android:orientation="horizontal"
android:theme="@style/Theme.Widget">
@@ -93,7 +93,7 @@
<android.widget.ImageButton
android:id="@+id/widget_play_pause"
style="@style/Widget.Auxio.FloatingActionButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget.PlayPause"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_play_pause"
+1 -1
View File
@@ -81,7 +81,7 @@
<android.widget.ImageButton
android:id="@+id/widget_play_pause"
style="@style/Widget.Auxio.FloatingActionButton.AppWidget"
style="@style/Widget.Auxio.MaterialButton.AppWidget.PlayPause"
android:layout_width="@dimen/size_btn"
android:layout_height="@dimen/size_btn"
android:contentDescription="@string/desc_play_pause"