image: add image group
Add a new view called ImageGroup that will handle all advanced image hacks from now on. This includes the indicator (which is now animated), any selection indicators, and the weirdness of the album song image. All of that is now handled by ImageGroup. This is the culmination of probably a day and a half of wrangling with android insanity and having to remove a lot of what I liked about the indicator in order to make this work on a basic level. The only major bug I am currently aware of with this is that the indicator is bugged out on Lollipop devices due to bad vectors. Again. I never want to do this again. I cannot believe that adding a basic indicator took this long and required so much stupid hacks and inefficient code. And then google wonders why android apps are so visually unappealing and janky and laggy. Hm. Must be that devs aren't using the brand new FooBarBlasterFlow library!
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
android:id="@+id/playback_cover"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
app:title="@string/lbl_playback"
|
||||
tools:subtitle="@string/lbl_all_songs" />
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
android:id="@+id/playback_cover"
|
||||
style="@style/Widget.Auxio.Image.Full"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
@@ -22,7 +22,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_toolbar"
|
||||
tools:src="@drawable/ic_album" />
|
||||
tools:placeholderIcon="@drawable/ic_song" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
@@ -70,7 +70,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
<org.oxycblt.auxio.playback.IndicatorMaterialButton
|
||||
android:id="@+id/playback_repeat"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -120,7 +120,7 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
|
||||
|
||||
<org.oxycblt.auxio.ui.IndicatorMaterialButton
|
||||
<org.oxycblt.auxio.playback.IndicatorMaterialButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
style="@style/Widget.Auxio.Button.Icon.Large"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -11,34 +11,36 @@
|
||||
view. The way we do this is odd, but it's designed this way.
|
||||
-->
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.ImageGroup
|
||||
android:id="@+id/song_track_bg"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
android:scaleType="matrix"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_track"
|
||||
app:layout_constraintEnd_toEndOf="@+id/song_track"
|
||||
app:layout_constraintStart_toStartOf="@+id/song_track"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_track" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_track"
|
||||
android:layout_width="@dimen/size_btn_small"
|
||||
android:layout_height="@dimen/size_btn_small"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
android:textColor="@color/sel_track_cover"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_track_number_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_track_number_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_track_number_step"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/song_name"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="16" />
|
||||
app:staticIcon="@drawable/ic_song"
|
||||
tools:visibility="invisible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_track"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
android:textColor="@color/sel_on_cover_bg"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_track_number_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_track_number_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_track_number_step"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/song_name"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="16" />
|
||||
|
||||
</org.oxycblt.auxio.image.ImageGroup>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
@@ -48,8 +50,8 @@
|
||||
android:textColor="@color/sel_accented_primary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_duration"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/song_track"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_track"
|
||||
app:layout_constraintStart_toEndOf="@+id/song_track_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_track_bg"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Song Name" />
|
||||
|
||||
@@ -59,9 +61,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_track"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_track_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/song_track"
|
||||
app:layout_constraintStart_toEndOf="@+id/song_track_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/song_name"
|
||||
tools:text="16:16" />
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Auxio.ItemLayout">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
android:id="@+id/artist_image"
|
||||
style="@style/Widget.Auxio.Image.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
tools:staticIcon="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_name"
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/spacing_medium">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
android:id="@+id/detail_cover"
|
||||
style="@style/Widget.Auxio.Image.MidHuge"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
tools:staticIcon="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/detail_name"
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/spacing_medium">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
android:id="@+id/disc_item"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
android:scaleType="matrix"
|
||||
android:src="@drawable/ic_album"
|
||||
app:staticIcon="@drawable/ic_album"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Auxio.ItemLayout">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.ImageGroup
|
||||
android:id="@+id/parent_image"
|
||||
style="@style/Widget.Auxio.Image.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
tools:staticIcon="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/parent_name"
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.StyledImageView
|
||||
android:id="@+id/song_album_cover"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_album" />
|
||||
tools:staticIcon="@drawable/ic_album" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Auxio.ItemLayout">
|
||||
|
||||
<org.oxycblt.auxio.ui.StyledImageView
|
||||
<org.oxycblt.auxio.image.ImageGroup
|
||||
android:id="@+id/song_album_cover"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_album" />
|
||||
tools:staticIcon="@drawable/ic_album" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
|
||||
Reference in New Issue
Block a user