Android: Add on-screen fast forward button

This commit is contained in:
Connor McLaughlin
2021-02-27 14:58:42 +10:00
parent d0ace6ed5a
commit 7bd11d38ac
7 changed files with 110 additions and 6 deletions

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M0.6615,0.6614L23.7969,0.6614v23.0L0.6615,23.7969Z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="0.26458332"
android:fillColor="#00000000"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round" />
<path
android:fillColor="#e6e6e6"
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
</vector>

View File

@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M0.6615,0.6614L23.7969,0.6614v23.0L0.6615,23.7969Z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="0.26458332"
android:fillColor="#4d4d4d"
android:strokeColor="#e6e6e6"
android:strokeLineCap="round" />
<path
android:fillColor="#e6e6e6"
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
</vector>

View File

@ -55,7 +55,7 @@
android:id="@+id/controller_button_start"
android:layout_width="40dp"
android:layout_height="25dp"
android:layout_marginStart="80dp"
android:layout_marginStart="70dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -68,7 +68,7 @@
android:id="@+id/controller_button_select"
android:layout_width="40dp"
android:layout_height="25dp"
android:layout_marginEnd="50dp"
android:layout_marginEnd="70dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -133,4 +133,16 @@
android:paddingRight="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<com.github.stenzek.duckstation.TouchscreenControllerButtonView
android:id="@+id/controller_button_fast_forward"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:pressedDrawable="@drawable/ic_controller_fast_forward_pressed"
app:unpressedDrawable="@drawable/ic_controller_fast_forward" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -55,7 +55,7 @@
android:id="@+id/controller_button_start"
android:layout_width="40dp"
android:layout_height="25dp"
android:layout_marginStart="80dp"
android:layout_marginStart="70dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -68,7 +68,7 @@
android:id="@+id/controller_button_select"
android:layout_width="40dp"
android:layout_height="25dp"
android:layout_marginEnd="50dp"
android:layout_marginEnd="70dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -198,4 +198,16 @@
app:layout_constraintStart_toStartOf="parent"
app:pressedDrawable="@drawable/ic_controller_up_button_pressed"
app:unpressedDrawable="@drawable/ic_controller_up_button" />
<com.github.stenzek.duckstation.TouchscreenControllerButtonView
android:id="@+id/controller_button_fast_forward"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:pressedDrawable="@drawable/ic_controller_fast_forward_pressed"
app:unpressedDrawable="@drawable/ic_controller_fast_forward" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -107,7 +107,7 @@
android:id="@+id/controller_button_start"
android:layout_width="40dp"
android:layout_height="25dp"
android:layout_marginStart="80dp"
android:layout_marginStart="70dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -120,7 +120,7 @@
android:id="@+id/controller_button_select"
android:layout_width="40dp"
android:layout_height="25dp"
android:layout_marginEnd="50dp"
android:layout_marginEnd="70dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -172,4 +172,16 @@
app:layout_constraintEnd_toEndOf="parent"
app:pressedDrawable="@drawable/ic_controller_circle_button_pressed"
app:unpressedDrawable="@drawable/ic_controller_circle_button" />
<com.github.stenzek.duckstation.TouchscreenControllerButtonView
android:id="@+id/controller_button_fast_forward"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:pressedDrawable="@drawable/ic_controller_fast_forward_pressed"
app:unpressedDrawable="@drawable/ic_controller_fast_forward" />
</androidx.constraintlayout.widget.ConstraintLayout>