adding buttons to the videoplayer for going to next/prev file
|
@ -161,6 +161,8 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
|||
video_curr_time.setOnClickListener { skip(false) }
|
||||
video_duration.setOnClickListener { skip(true) }
|
||||
video_toggle_play_pause.setOnClickListener { togglePlayPause() }
|
||||
video_next_file.setOnClickListener { }
|
||||
video_prev_file.setOnClickListener { }
|
||||
|
||||
video_player_holder.setOnTouchListener { view, event ->
|
||||
handleEvent(event)
|
||||
|
@ -419,7 +421,7 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
|||
}
|
||||
|
||||
val newAlpha = if (isFullScreen) 0f else 1f
|
||||
arrayOf(video_toggle_play_pause, video_curr_time, video_seekbar, video_duration, top_shadow, video_bottom_gradient).forEach {
|
||||
arrayOf(video_prev_file, video_toggle_play_pause, video_next_file, video_curr_time, video_seekbar, video_duration, top_shadow, video_bottom_gradient).forEach {
|
||||
it.animate().alpha(newAlpha).start()
|
||||
}
|
||||
video_seekbar.setOnSeekBarChangeListener(if (mIsFullscreen) null else this)
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_next_outline.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_prev_outline.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_next_outline.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_prev_outline.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_next_outline.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_prev_outline.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_next_outline.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_prev_outline.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
|
@ -7,6 +7,17 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/video_prev_file"
|
||||
android:layout_width="@dimen/video_player_play_pause_size"
|
||||
android:layout_height="@dimen/video_player_play_pause_size"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="@dimen/small_margin"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/normal_margin"
|
||||
android:src="@drawable/ic_prev_outline"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/video_toggle_play_pause"
|
||||
android:layout_width="@dimen/video_player_play_pause_size"
|
||||
|
@ -18,6 +29,17 @@
|
|||
android:src="@drawable/ic_pause_outline"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/video_next_file"
|
||||
android:layout_width="@dimen/video_player_play_pause_size"
|
||||
android:layout_height="@dimen/video_player_play_pause_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:layout_marginEnd="@dimen/small_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="@dimen/normal_margin"
|
||||
android:src="@drawable/ic_next_outline"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_curr_time"
|
||||
android:layout_width="wrap_content"
|
||||
|
|