Added extra controls

main
h4h13 2019-12-08 20:13:56 +05:30
parent 648f3c115a
commit 4d6286401b
2 changed files with 26 additions and 0 deletions

View File

@ -49,14 +49,20 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
setUpMiniPlayer()
if (RetroUtil.isTablet()) {
actionNext.visibility = View.VISIBLE
actionPrevious.visibility = View.VISIBLE
actionNext?.visibility = View.VISIBLE
actionPrevious?.visibility = View.VISIBLE
actionPlayingQueue.visibility = View.VISIBLE
} 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
actionPrevious.visibility = if (PreferenceUtil.getInstance(requireContext()).isExtraControls) View.VISIBLE else View.GONE
}
actionPlayingQueue.setOnClickListener(this)
actionNext.setOnClickListener(this)
actionPrevious.setOnClickListener(this)
actionNext?.setOnClickListener(this)
actionPrevious?.setOnClickListener(this)

View File

@ -47,6 +47,16 @@
android:textColor="?android:attr/textColorPrimary"
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
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -75,6 +85,16 @@
tools:progress="80" />
</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
android:id="@+id/actionPlayingQueue"
android:layout_width="40dp"