move the video player bottom gradient in a different view

This commit is contained in:
tibbi
2019-01-03 23:45:59 +01:00
parent 04f8abe23f
commit 1bc4ce47bb
4 changed files with 15 additions and 3 deletions

View File

@ -244,6 +244,7 @@ open class PanoramaVideoActivity : SimpleActivity(), SeekBar.OnSeekBarChangeList
}
video_time_holder.setPadding(0, 0, right, bottom)
video_time_holder.background = resources.getDrawable(R.drawable.gradient_background)
video_time_holder.onGlobalLayout {
val newBottomMargin = video_time_holder.height - resources.getDimension(R.dimen.video_player_play_pause_size).toInt() - resources.getDimension(R.dimen.activity_margin).toInt()
(explore.layoutParams as RelativeLayout.LayoutParams).bottomMargin = newBottomMargin

View File

@ -399,6 +399,7 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
val newAlpha = if (isFullScreen) 0f else 1f
top_shadow.animate().alpha(newAlpha).start()
video_time_holder.animate().alpha(newAlpha).start()
video_bottom_gradient.animate().alpha(newAlpha).start()
video_seekbar.setOnSeekBarChangeListener(if (mIsFullscreen) null else this)
arrayOf(video_toggle_play_pause, video_curr_time, video_duration).forEach {
it.isClickable = !mIsFullscreen