diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/drawable-night/ic_playback_speed_24dp.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_playback_speed_24dp.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_playback_speed_toolbar_24dp.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_playback_speed.xml | 151 | ||||
-rw-r--r-- | app/src/main/res/menu/view_video.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 |
6 files changed, 177 insertions, 0 deletions
diff --git a/app/src/main/res/drawable-night/ic_playback_speed_24dp.xml b/app/src/main/res/drawable-night/ic_playback_speed_24dp.xml new file mode 100644 index 00000000..1e774fee --- /dev/null +++ b/app/src/main/res/drawable-night/ic_playback_speed_24dp.xml @@ -0,0 +1,6 @@ +<vector android:height="24dp" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58H5.07A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44z"/> + <path android:fillColor="@android:color/white" android:pathData="M10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_playback_speed_24dp.xml b/app/src/main/res/drawable/ic_playback_speed_24dp.xml new file mode 100644 index 00000000..1ab79da6 --- /dev/null +++ b/app/src/main/res/drawable/ic_playback_speed_24dp.xml @@ -0,0 +1,6 @@ +<vector android:height="24dp" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/black" android:pathData="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58H5.07A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44z"/> + <path android:fillColor="@android:color/black" android:pathData="M10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z"/> +</vector> diff --git a/app/src/main/res/drawable/ic_playback_speed_toolbar_24dp.xml b/app/src/main/res/drawable/ic_playback_speed_toolbar_24dp.xml new file mode 100644 index 00000000..289e7669 --- /dev/null +++ b/app/src/main/res/drawable/ic_playback_speed_toolbar_24dp.xml @@ -0,0 +1,6 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M20.38,8.57l-1.23,1.85a8,8 0,0 1,-0.22 7.58H5.07A8,8 0,0 1,15.58 6.85l1.85,-1.23A10,10 0,0 0,3.35 19a2,2 0,0 0,1.72 1h13.85a2,2 0,0 0,1.74 -1,10 10,0 0,0 -0.27,-10.44z"/> + <path android:fillColor="@android:color/white" android:pathData="M10.59,15.41a2,2 0,0 0,2.83 0l5.66,-8.49 -8.49,5.66a2,2 0,0 0,0 2.83z"/> +</vector> diff --git a/app/src/main/res/layout/fragment_playback_speed.xml b/app/src/main/res/layout/fragment_playback_speed.xml new file mode 100644 index 00000000..11402d8b --- /dev/null +++ b/app/src/main/res/layout/fragment_playback_speed.xml @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="8dp" + android:overScrollMode="never"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/playback_speed_025_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="0.25x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_050_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="0.5x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_075_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="0.75x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_normal_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="@string/normal" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_125_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="1.25x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_150_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="1.5x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_175_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="1.75x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/playback_speed_200_text_view_playback_speed_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:text="2x" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + </LinearLayout> + +</androidx.core.widget.NestedScrollView>
\ No newline at end of file diff --git a/app/src/main/res/menu/view_video.xml b/app/src/main/res/menu/view_video.xml index fa54098f..fa00369b 100644 --- a/app/src/main/res/menu/view_video.xml +++ b/app/src/main/res/menu/view_video.xml @@ -7,4 +7,11 @@ android:title="@string/action_download" android:icon="@drawable/ic_file_download_toolbar_white_24dp" app:showAsAction="ifRoom" /> + + <item + android:id="@+id/action_playback_speed_view_video_activity" + android:orderInCategory="2" + android:title="@string/action_playback_speed" + android:icon="@drawable/ic_playback_speed_toolbar_24dp" + app:showAsAction="ifRoom" /> </menu>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 203126ca..11e062eb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -90,6 +90,7 @@ <string name="action_share_rpan_link">Share RPAN Link</string> <string name="action_share_post_link">Share Post Link</string> <string name="action_go_to_wiki">Go to Wiki</string> + <string name="action_playback_speed">Playback Speed</string> <string name="parse_json_response_error">Error occurred when parsing the JSON response</string> <string name="retrieve_token_error">Error Retrieving the token</string> |