ui: use marquee in all playback info
Use marquee in all playback information. It's the playback view, and thus "activated", so why not.
This commit is contained in:
parent
5e0f778daf
commit
186d5a9186
15 changed files with 56 additions and 33 deletions
|
@ -3,7 +3,6 @@
|
|||
## 3.0.0
|
||||
|
||||
#### What's New
|
||||
- Auxio now has a more unique and modern icon design
|
||||
- Added multi-value tags support
|
||||
- Added support for multiple artists
|
||||
- Added support for multiple genres
|
||||
|
@ -13,6 +12,8 @@
|
|||
- Use the more unique MD5 hash of metadata when MBIDs can't be used
|
||||
- Added toggle to load non-music (Such as podcasts)
|
||||
- Music loader now caches parsed metadata for faster load times
|
||||
- Redesigned icon
|
||||
- Added animated splash screen on Android 12+
|
||||
|
||||
#### What's Improved
|
||||
- Sorting now takes accented characters into account
|
||||
|
@ -20,6 +21,7 @@
|
|||
- Album dates now start from the earliest date instead of latest date
|
||||
- Reshuffling the queue will no longer drop any songs you have added/removed
|
||||
- Allowed light/dark theme to be customized on Android 12+
|
||||
- All information now scrolls in the playback view
|
||||
|
||||
#### What's Fixed
|
||||
- Fixed issue where the scroll popup would not display correctly in landscape mode [#230]
|
||||
|
|
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
|
@ -20,8 +20,5 @@
|
|||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-keep class org.oxycblt.auxio.AuxioApp
|
||||
-keep class org.oxycblt.auxio.settings.prefs.SettingsListFragment
|
||||
|
||||
# Free software does not obsfucate. Also it's easier to debug stack traces.
|
||||
-dontobfuscate
|
|
@ -335,7 +335,7 @@ class DetailViewModel(application: Application) :
|
|||
EPS(R.string.lbl_eps),
|
||||
SINGLES(R.string.lbl_singles),
|
||||
COMPILATIONS(R.string.lbl_compilations),
|
||||
SOUNDTRACKS(R.string.lbl_compilations),
|
||||
SOUNDTRACKS(R.string.lbl_soundtracks),
|
||||
MIXES(R.string.lbl_mixes),
|
||||
MIXTAPES(R.string.lbl_mixtapes),
|
||||
LIVE(R.string.lbl_live_group),
|
||||
|
|
|
@ -21,6 +21,7 @@ import androidx.lifecycle.ViewModel
|
|||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import org.oxycblt.auxio.music.system.Indexer
|
||||
import org.oxycblt.auxio.util.logD
|
||||
|
||||
/**
|
||||
* A ViewModel representing the current indexing state.
|
||||
|
@ -48,6 +49,7 @@ class MusicViewModel : ViewModel(), Indexer.Callback {
|
|||
}
|
||||
|
||||
override fun onIndexerStateChanged(state: Indexer.State?) {
|
||||
logD("New state: $state")
|
||||
_indexerState.value = state
|
||||
if (state is Indexer.State.Complete && state.response is Indexer.Response.Ok) {
|
||||
_libraryExists.value = true
|
||||
|
|
|
@ -80,18 +80,25 @@ class PlaybackPanelFragment :
|
|||
setOnMenuItemClickListener(this@PlaybackPanelFragment)
|
||||
}
|
||||
|
||||
// Make sure we enable marquee on the song info
|
||||
|
||||
binding.playbackSong.apply {
|
||||
// Make marquee of the song title work
|
||||
isSelected = true
|
||||
setOnClickListener { playbackModel.song.value?.let(navModel::exploreNavigateTo) }
|
||||
}
|
||||
|
||||
binding.playbackArtist.setOnClickListener {
|
||||
playbackModel.song.value?.let { showCurrentArtist() }
|
||||
binding.playbackArtist.apply {
|
||||
isSelected = true
|
||||
setOnClickListener {
|
||||
playbackModel.song.value?.let { showCurrentArtist() }
|
||||
}
|
||||
}
|
||||
|
||||
binding.playbackAlbum.setOnClickListener {
|
||||
playbackModel.song.value?.let { showCurrentAlbum() }
|
||||
binding.playbackAlbum.apply {
|
||||
isSelected = true
|
||||
setOnClickListener {
|
||||
playbackModel.song.value?.let { showCurrentAlbum() }
|
||||
}
|
||||
}
|
||||
|
||||
binding.playbackSeekBar.callback = this
|
||||
|
@ -114,7 +121,12 @@ class PlaybackPanelFragment :
|
|||
|
||||
override fun onDestroyBinding(binding: FragmentPlaybackPanelBinding) {
|
||||
binding.playbackToolbar.setOnMenuItemClickListener(null)
|
||||
|
||||
// Leaving marquee on will cause a leak
|
||||
binding.playbackSong.isSelected = false
|
||||
binding.playbackArtist.isSelected = false
|
||||
binding.playbackAlbum.isSelected = false
|
||||
|
||||
binding.playbackSeekBar.callback = null
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<path
|
||||
android:name="note"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:pathData="M 13,4.0000207 17,8 M 12.999969,4.0004121 V 17.000315 m 0,-2.94e-4 -3.0000004,3 -2.9999997,-3 2.9999997,-3 M 7.021336,16.939069"
|
||||
android:pathData="M 13,4.0000207 17,8 M 12.999969,4.0004121 V 17.000315 m 0,-0.0002940 -3.0000004,3 -2.9999997,-3 2.9999997,-3 M 7.021336,16.939069"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
style="@style/Widget.Auxio.TextView.Primary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
|
@ -41,8 +41,8 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/playback_artist"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Marquee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
|
@ -53,8 +53,8 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/playback_album"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
android:layout_width="0dp"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Marquee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_subhead"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_subhead"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/playback_artist"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Marquee"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
@ -53,7 +53,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/playback_album"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Marquee"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_subhead"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_subhead"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
@ -59,7 +59,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/playback_artist"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Marquee"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/playback_album"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Marquee"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_subhead"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/detail_info"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary.Ellipsize"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
|
|
|
@ -128,13 +128,23 @@
|
|||
<item name="android:textAppearance">@style/TextAppearance.Auxio.TitleLarge</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.TextView.Secondary" parent="Widget.Auxio.TextView.Base">
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<style name="Widget.Auxio.TextView.Secondary.Base" parent="Widget.Auxio.TextView.Base">
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.Auxio.BodyLarge</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.TextView.Secondary.Ellipsize" parent="Widget.Auxio.TextView.Secondary.Base">
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.TextView.Secondary.Marquee" parent="Widget.Auxio.TextView.Secondary.Base">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:ellipsize">marquee</item>
|
||||
<item name="android:marqueeRepeatLimit">marquee_forever</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.TextView.Primary.Compact" parent="Widget.Auxio.TextView.Base">
|
||||
<item name="android:ellipsize">marquee</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
|
|
Loading…
Reference in a new issue