show the bottom gradient at video fragment only if bottom actions are disabled

This commit is contained in:
tibbi 2018-07-04 19:54:51 +02:00
parent 0dba5114a1
commit 5420321207
2 changed files with 7 additions and 6 deletions

View file

@ -177,8 +177,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
override fun onResume() {
super.onResume()
activity!!.updateTextColors(mView!!.video_holder)
val allowVideoGestures = context!!.config.allowVideoGestures
val allowInstantChange = context!!.config.allowInstantChange
val config = context!!.config
val allowVideoGestures = config.allowVideoGestures
val allowInstantChange = config.allowInstantChange
mView!!.apply {
video_volume_controller.beVisibleIf(allowVideoGestures)
video_brightness_controller.beVisibleIf(allowVideoGestures)
@ -187,14 +188,15 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
instant_next_item.beVisibleIf(allowInstantChange)
}
if (context!!.config.showExtendedDetails != mStoredShowExtendedDetails || context!!.config.extendedDetails != mStoredExtendedDetails) {
if (config.showExtendedDetails != mStoredShowExtendedDetails || config.extendedDetails != mStoredExtendedDetails) {
checkExtendedDetails()
}
if (context!!.config.bottomActions != mStoredBottomActions) {
if (config.bottomActions != mStoredBottomActions) {
initTimeHolder()
}
mView!!.video_time_holder.setBackgroundResource(if (config.bottomActions) 0 else R.drawable.gradient_background)
storeStateVariables()
}

View file

@ -80,8 +80,7 @@
android:id="@+id/video_time_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/gradient_background">
android:layout_alignParentBottom="true">
<TextView
android:id="@+id/video_curr_time"