improved video player controller

This commit is contained in:
Mariotaku Lee 2017-04-11 21:13:18 +08:00
parent 56df1bf145
commit 903933705b
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 18 additions and 13 deletions

View File

@ -22,37 +22,35 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:clickable="true" android:layout_height="?actionBarSize"
android:orientation="horizontal"> android:clickable="true">
<FrameLayout <FrameLayout
android:id="@+id/playPauseContainer" android:id="@+id/playPauseContainer"
android:layout_width="wrap_content" android:layout_width="@dimen/element_size_normal"
android:layout_height="match_parent" android:layout_height="@dimen/element_size_normal"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"> android:layout_alignParentStart="true">
<ImageButton <ImageButton
android:id="@id/exo_play" android:id="@id/exo_play"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/exo_controls_play_description" android:contentDescription="@string/exo_controls_play_description"
android:minWidth="@dimen/element_size_normal"
android:src="@drawable/ic_action_play_arrow" android:src="@drawable/ic_action_play_arrow"
tools:visibility="visible"/> tools:visibility="visible"/>
<ImageButton <ImageButton
android:id="@id/exo_pause" android:id="@id/exo_pause"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/exo_controls_pause_description" android:contentDescription="@string/exo_controls_pause_description"
android:minWidth="@dimen/element_size_normal"
android:src="@drawable/ic_action_pause" android:src="@drawable/ic_action_pause"
tools:visibility="gone"/> tools:visibility="gone"/>
</FrameLayout> </FrameLayout>
@ -63,7 +61,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@id/exo_progress" android:layout_alignLeft="@id/exo_progress"
android:layout_alignStart="@id/exo_progress" android:layout_alignStart="@id/exo_progress"
android:layout_below="@id/exo_progress" android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/element_spacing_xsmall"
android:layout_marginLeft="@dimen/element_spacing_small"
android:layout_marginStart="@dimen/element_spacing_small"
android:gravity="center" android:gravity="center"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textSize="@dimen/text_size_extra_small" android:textSize="@dimen/text_size_extra_small"
@ -83,10 +84,13 @@
<org.mariotaku.twidere.view.FixedTextView <org.mariotaku.twidere.view.FixedTextView
android:id="@id/exo_duration" android:id="@id/exo_duration"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignEnd="@id/exo_progress" android:layout_alignEnd="@id/exo_progress"
android:layout_alignRight="@id/exo_progress" android:layout_alignRight="@id/exo_progress"
android:layout_below="@id/exo_progress" android:layout_marginBottom="@dimen/element_spacing_xsmall"
android:layout_marginEnd="@dimen/element_spacing_small"
android:layout_marginRight="@dimen/element_spacing_small"
android:gravity="center" android:gravity="center"
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textSize="@dimen/text_size_extra_small" android:textSize="@dimen/text_size_extra_small"
@ -94,10 +98,11 @@
<ImageButton <ImageButton
android:id="@+id/volumeButton" android:id="@+id/volumeButton"
android:layout_width="wrap_content" android:layout_width="@dimen/element_size_normal"
android:layout_height="match_parent" android:layout_height="@dimen/element_size_normal"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/action_mute" android:contentDescription="@string/action_mute"