Added extra controls
This commit is contained in:
parent
648f3c115a
commit
4d6286401b
2 changed files with 26 additions and 0 deletions
|
@ -49,14 +49,20 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
|
||||||
setUpMiniPlayer()
|
setUpMiniPlayer()
|
||||||
|
|
||||||
if (RetroUtil.isTablet()) {
|
if (RetroUtil.isTablet()) {
|
||||||
|
actionNext.visibility = View.VISIBLE
|
||||||
|
actionPrevious.visibility = View.VISIBLE
|
||||||
actionNext?.visibility = View.VISIBLE
|
actionNext?.visibility = View.VISIBLE
|
||||||
actionPrevious?.visibility = View.VISIBLE
|
actionPrevious?.visibility = View.VISIBLE
|
||||||
actionPlayingQueue.visibility = View.VISIBLE
|
actionPlayingQueue.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
|
actionNext.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
|
||||||
actionPlayingQueue.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.GONE else View.VISIBLE
|
actionPlayingQueue.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.GONE else View.VISIBLE
|
||||||
|
actionPrevious.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
actionPlayingQueue.setOnClickListener(this)
|
actionPlayingQueue.setOnClickListener(this)
|
||||||
|
actionNext.setOnClickListener(this)
|
||||||
|
actionPrevious.setOnClickListener(this)
|
||||||
actionNext?.setOnClickListener(this)
|
actionNext?.setOnClickListener(this)
|
||||||
actionPrevious?.setOnClickListener(this)
|
actionPrevious?.setOnClickListener(this)
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,16 @@
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
tools:text="@tools:sample/lorem/random" />
|
tools:text="@tools:sample/lorem/random" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/actionPrevious"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:background="?roundSelector"
|
||||||
|
android:padding="6dp"
|
||||||
|
app:srcCompat="@drawable/ic_skip_previous_white_24dp"
|
||||||
|
app:tint="?attr/colorControlNormal" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -75,6 +85,16 @@
|
||||||
tools:progress="80" />
|
tools:progress="80" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/actionNext"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:background="?roundSelector"
|
||||||
|
android:padding="6dp"
|
||||||
|
app:srcCompat="@drawable/ic_skip_next_white_24dp"
|
||||||
|
app:tint="?attr/colorControlNormal" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/actionPlayingQueue"
|
android:id="@+id/actionPlayingQueue"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
|
|
Loading…
Reference in a new issue