improve double tap size

This commit is contained in:
Bnyro 2022-07-09 18:28:10 +02:00
parent 1c32176c30
commit ff6d738580
2 changed files with 44 additions and 29 deletions

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layoutDescription="@xml/activity_main_scene" app:layoutDescription="@xml/activity_main_scene"
tools:context=".MainActivity"> tools:context=".activities.MainActivity">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"

View File

@ -363,16 +363,48 @@
app:layout_constraintTop_toTopOf="@id/main_container" app:layout_constraintTop_toTopOf="@id/main_container"
app:show_buffering="when_playing"> app:show_buffering="when_playing">
<!-- double tap to rewind/forward overlay -->
<LinearLayout
android:id="@+id/doubleTapOverlayLL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginVertical="50dp">
<!-- double tap rewind btn -->
<FrameLayout
android:id="@+id/rewindFL"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".40">
<ImageButton
android:id="@+id/rewindBTN"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:selectableItemBackgroundBorderless"
android:clickable="false"
android:src="@drawable/ic_rewind"
android:visibility="invisible"
app:tint="@android:color/white" />
</FrameLayout>
<!-- place holder for the center controls -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".20" />
<!-- double tap forward btn -->
<FrameLayout <FrameLayout
android:id="@+id/forwardFL" android:id="@+id/forwardFL"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="center_vertical|end" android:layout_weight=".40">
android:layout_marginVertical="50dp">
<ImageButton <ImageButton
android:id="@+id/forwardBTN" android:id="@+id/forwardBTN"
android:layout_width="150dp" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?android:selectableItemBackgroundBorderless" android:background="?android:selectableItemBackgroundBorderless"
android:clickable="false" android:clickable="false"
@ -382,24 +414,7 @@
</FrameLayout> </FrameLayout>
<FrameLayout </LinearLayout>
android:id="@+id/rewindFL"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical|start"
android:layout_marginVertical="50dp">
<ImageButton
android:id="@+id/rewindBTN"
android:layout_width="150dp"
android:layout_height="match_parent"
android:background="?android:selectableItemBackgroundBorderless"
android:clickable="false"
android:src="@drawable/ic_rewind"
android:visibility="invisible"
app:tint="@android:color/white" />
</FrameLayout>
</com.github.libretube.views.CustomExoPlayerView> </com.github.libretube.views.CustomExoPlayerView>