Skip to content

Commit e06491f

Browse files
committed
YouTube: Add ripple effect to custom player buttons
1 parent c0ffa4e commit e06491f

File tree

7 files changed

+15
-21
lines changed

7 files changed

+15
-21
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#33ffffff"/>

app/src/main/res/layout/revanced_copy_video_url_button.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
android:id="@+id/revanced_copy_video_url_button"
88
android:layout_width="48.0dip"
99
android:layout_height="60.0dip"
10-
android:background="@null"
11-
android:clickable="true"
12-
android:focusable="true"
10+
style="@style/YouTubePlayerButton"
1311
android:paddingTop="6.0dp"
1412
android:paddingBottom="0dp"
1513
android:scaleType="center"
@@ -19,9 +17,7 @@
1917
android:id="@+id/revanced_copy_video_url_timestamp_button"
2018
android:layout_width="48.0dip"
2119
android:layout_height="60.0dip"
22-
android:background="@null"
23-
android:clickable="true"
24-
android:focusable="true"
20+
style="@style/YouTubePlayerButton"
2521
android:paddingTop="6.0dp"
2622
android:paddingBottom="0dp"
2723
android:scaleType="center"

app/src/main/res/layout/revanced_external_download_button.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55

66
<com.google.android.libraries.youtube.common.ui.TouchImageView
77
android:id="@+id/revanced_external_download_button"
8+
style="@style/YouTubePlayerButton"
89
android:layout_width="48.0dip"
910
android:layout_height="60.0dip"
10-
android:background="@null"
11-
android:clickable="true"
12-
android:focusable="true"
1311
android:longClickable="false"
1412
android:paddingTop="6.5dp"
1513
android:paddingBottom="0dp"

app/src/main/res/layout/revanced_playback_speed_dialog_button.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
<com.google.android.libraries.youtube.common.ui.TouchImageView
1212
android:id="@+id/revanced_playback_speed_dialog_button"
13-
android:background="@null"
14-
android:clickable="true"
15-
android:focusable="true"
13+
style="@style/YouTubePlayerButton"
1614
android:layout_width="match_parent"
1715
android:layout_height="match_parent"
1816
android:longClickable="false"

app/src/main/res/layout/revanced_sb_button.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
<com.google.android.libraries.youtube.common.ui.TouchImageView
66
android:id="@+id/revanced_sb_voting_button"
7-
android:background="@null"
8-
android:clickable="true"
9-
android:focusable="true"
7+
style="@style/YouTubePlayerButton"
108
android:layout_width="@dimen/controls_overlay_action_button_size"
119
android:layout_height="@dimen/controls_overlay_action_button_size"
1210
android:layout_alignWithParentIfMissing="true"
@@ -20,9 +18,7 @@
2018

2119
<com.google.android.libraries.youtube.common.ui.TouchImageView
2220
android:id="@+id/revanced_sb_create_segment_button"
23-
android:background="@null"
24-
android:clickable="true"
25-
android:focusable="true"
21+
style="@style/YouTubePlayerButton"
2622
android:layout_width="@dimen/controls_overlay_action_button_size"
2723
android:layout_height="@dimen/controls_overlay_action_button_size"
2824
android:layout_alignWithParentIfMissing="true"

app/src/main/res/layout/revanced_video_quality_dialog_button_container.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
<com.google.android.libraries.youtube.common.ui.TouchImageView
1212
android:id="@+id/revanced_video_quality_dialog_button"
13-
android:background="@null"
14-
android:clickable="true"
15-
android:focusable="true"
13+
style="@style/YouTubePlayerButton"
1614
android:layout_width="match_parent"
1715
android:layout_height="match_parent"
1816
android:longClickable="false"

app/src/main/res/values/styles.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,10 @@
1818
<resources>
1919
<style name="Theme.ReVanced.YouTubeMusic.Settings" parent="android:ThemeOverlay.Material.Dark">
2020
</style>
21+
22+
<style name="YouTubePlayerButton" parent="">
23+
<item name="android:focusable">true</item>
24+
<item name="android:clickable">true</item>
25+
<item name="android:background">@drawable/player_button_background</item>
26+
</style>
2127
</resources>

0 commit comments

Comments
 (0)