diff --git a/CHANGELOG.md b/CHANGELOG.md index d1844357a..fcdaf6fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,14 @@ #### What's New - Added a shuffle shortcut -- Reworked the button appearance on widgets +- Widgets now have a more sleek and consistent button layout +- "Rounded album covers" is now "Round mode" - You can now customize what occurs when a song is played from an album/artist/genre [#164] #### What's Improved - Made "timeline" elements (like playback controls) always left-to-right - Improved performance when ReplayGain is not enabled -- Playback bar now has rounded corners (when rounded covers is enabled) +- Playback bar now has rounded corners (when round mode is enabled) - Massively improved main layout performance #### What's Fixed @@ -21,7 +22,8 @@ - Fixed crash if settings was navigated away before playback state finished saving - Fixed broken album menu -- Fixed crash that would occur when opening a file on some devices #176 +- Fixed crash that would occur when opening a file on some devices [#176] +- Fixed issue where the search filter menu would not display the correct mode #### What's Changed - Reworked typography and iconography to be more aligned with material design guidelines diff --git a/app/src/main/java/org/oxycblt/auxio/playback/IndicatorMaterialButton.kt b/app/src/main/java/org/oxycblt/auxio/playback/IndicatorMaterialButton.kt index 7cfdc50a2..054e25bec 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/IndicatorMaterialButton.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/IndicatorMaterialButton.kt @@ -25,6 +25,13 @@ import com.google.android.material.button.MaterialButton import org.oxycblt.auxio.R import org.oxycblt.auxio.util.getDrawableSafe +/** + * Extends [MaterialButton] to add a dot indicator to the bottom of the view. + * + * TODO: Experiment with the "grade" attribute on Material Icons so that I can replace this + * + * @author OxygenCobalt + */ class IndicatorMaterialButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0) : diff --git a/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt b/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt index f287a77fd..cf742c1b0 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/StyledSeekBar.kt @@ -57,8 +57,6 @@ constructor( private val binding = ViewSeekBarBinding.inflate(context.inflater, this, true) init { - // As per the Material Design guidelines, timeline elements like SeekBars and Controls - // should always be LTR. binding.seekBarSlider.addOnSliderTouchListener(this) binding.seekBarSlider.addOnChangeListener(this) } diff --git a/app/src/main/java/org/oxycblt/auxio/ui/DisplayMode.kt b/app/src/main/java/org/oxycblt/auxio/ui/DisplayMode.kt index 1c28abc3d..2bdd1d94f 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/DisplayMode.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/DisplayMode.kt @@ -53,10 +53,10 @@ enum class DisplayMode { val itemId: Int get() = when (this) { - SHOW_SONGS -> R.drawable.ic_song_24 - SHOW_ALBUMS -> R.drawable.ic_album_24 - SHOW_ARTISTS -> R.drawable.ic_artist_24 - SHOW_GENRES -> R.drawable.ic_genre_24 + SHOW_SONGS -> R.id.option_filter_songs + SHOW_ALBUMS -> R.id.option_filter_albums + SHOW_ARTISTS -> R.id.option_filter_artists + SHOW_GENRES -> R.id.option_filter_genres } val intCode: Int diff --git a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt index 286ccc896..8a641f0aa 100644 --- a/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt +++ b/app/src/main/java/org/oxycblt/auxio/widgets/WidgetComponent.kt @@ -60,8 +60,6 @@ class WidgetComponent(private val context: Context) : * Force-update the widget. */ fun update() { - // TODO: Respond to rounded covers - // Updating Auxio's widget is unlike the rest of Auxio for a few reasons: // 1. We can't use the typical primitives like ViewModels // 2. The component range is far smaller, so we have to do some odd hacks to get @@ -86,19 +84,16 @@ class WidgetComponent(private val context: Context) : override fun onConfigRequest(builder: ImageRequest.Builder): ImageRequest.Builder { val cornerRadius = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + // Android 12, always round the cover with the app widget's inner radius context.getDimenSizeSafe(android.R.dimen.system_app_widget_inner_radius) } else if (settings.roundMode) { + // < Android 12, but the user still enabled round mode. context.getDimenSizeSafe(R.dimen.size_corners_large) } else { + // User did not enable round mode. 0 } - // The widget has two distinct styles that we must transform the album art to - // accommodate: - // - Before Android 12, the widget has hard edges, so we don't need to round - // out the album art. - // - After Android 12, the widget has round edges, so we need to round out - // the album art. I dislike this, but it's mainly for stylistic cohesion. return if (cornerRadius > 0) { this@WidgetComponent.logD("Loading round covers: $cornerRadius")