mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30:31 +05:30
[Audio Player] Auto scroll the title and uploader
This commit is contained in:
parent
00cf7d89d5
commit
f2fce67454
@ -80,6 +80,10 @@ class AudioPlayerFragment : BaseFragment() {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
// select the title TV in order for it to automatically scroll
|
||||
binding.title.isSelected = true
|
||||
binding.uploader.isSelected = true
|
||||
|
||||
binding.prev.setOnClickListener {
|
||||
val currentIndex = PlayingQueue.currentIndex()
|
||||
if (!PlayingQueue.hasPrev()) return@setOnClickListener
|
||||
|
@ -39,21 +39,17 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextViewMarquee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uploader"
|
||||
style="@style/TextViewMarquee"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -239,11 +239,23 @@
|
||||
</style>
|
||||
|
||||
<style name="AudioPlayerButton">
|
||||
|
||||
<item name="android:layout_width">30dp</item>
|
||||
<item name="android:layout_height">30dp</item>
|
||||
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
|
||||
<item name="android:layout_marginStart">10dp</item>
|
||||
<item name="android:layout_marginEnd">10dp</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="TextViewMarquee">
|
||||
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:ellipsize">marquee</item>
|
||||
<item name="android:marqueeRepeatLimit">marquee_forever</item>
|
||||
<item name="android:scrollHorizontally">true</item>
|
||||
<item name="android:textAlignment">center</item>
|
||||
|
||||
</style>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user