-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(YouTube - Overlay buttons): Add
Mute Video
button (#684)
* feat(YouTube - Overlay buttons): Add minimal MuteVolume button * feat(YouTube - Overlay buttons): Swap icons when audio is muted or not * feat(YouTube - Overlay buttons): Add all Mute Volume icons * chore: Update icons and button id --------- Co-authored-by: Aaron Veil <[email protected]>
- Loading branch information
1 parent
8bcb207
commit fb26c7a
Showing
36 changed files
with
137 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.88 KB
...utube/overlaybuttons/bold/drawable-hdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.44 KB
...e/overlaybuttons/bold/drawable-hdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.31 KB
...utube/overlaybuttons/bold/drawable-mdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.44 KB
...e/overlaybuttons/bold/drawable-mdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.64 KB
...tube/overlaybuttons/bold/drawable-xhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.19 KB
.../overlaybuttons/bold/drawable-xhdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.06 KB
...ube/overlaybuttons/bold/drawable-xxhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.87 KB
...overlaybuttons/bold/drawable-xxhdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.22 KB
...be/overlaybuttons/bold/drawable-xxxhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.35 KB
...verlaybuttons/bold/drawable-xxxhdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+989 Bytes
...be/overlaybuttons/rounded/drawable-hdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.3 KB
...verlaybuttons/rounded/drawable-hdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+667 Bytes
...be/overlaybuttons/rounded/drawable-mdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+909 Bytes
...verlaybuttons/rounded/drawable-mdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.34 KB
...e/overlaybuttons/rounded/drawable-xhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.73 KB
...erlaybuttons/rounded/drawable-xhdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.19 KB
.../overlaybuttons/rounded/drawable-xxhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.07 KB
...rlaybuttons/rounded/drawable-xxhdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2 KB
...overlaybuttons/rounded/drawable-xxxhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.08 KB
...laybuttons/rounded/drawable-xxxhdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
src/main/resources/youtube/overlaybuttons/shared/drawable/mute_volume_button.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector android:constantSize="true" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_activated="true"> | ||
<bitmap android:src="@drawable/revanced_overlay_button_mute_volume" android:tint="?ytTextPrimary"/> | ||
</item> | ||
<item android:state_activated="false"> | ||
<bitmap android:src="@drawable/revanced_overlay_button_mute_volume_off" android:tint="?ytTextPrimary"/> | ||
</item> | ||
</selector> |
125 changes: 117 additions & 8 deletions
125
...ources/youtube/overlaybuttons/shared/host/layout/youtube_controls_bottom_ui_container.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,119 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yt="http://schemas.android.com/apk/res-auto" android:id="@+id/youtube_controls_bottom_ui_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layoutDirection="ltr"> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/speed_dialog_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_speed_dialog_title" android:src="@drawable/revanced_speed_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_button" style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_copy_video_url_title" android:src="@drawable/revanced_copy_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_timestamp_button" style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_copy_video_url_timestamp_title" android:src="@drawable/revanced_copy_icon_with_time" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/whitelist_button" style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/whitelist_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_whitelist_title" android:src="@drawable/revanced_whitelist_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/time_ordered_playlist_button" style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/time_ordered_playlist_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_time_ordered_playlist_title" android:src="@drawable/revanced_time_ordered_playlist_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/always_repeat_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_always_repeat_title" android:src="@drawable/revanced_repeat_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/external_download_button" style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/external_download_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:contentDescription="@string/revanced_overlay_button_external_downloader_title" android:src="@drawable/revanced_download_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" style="@style/YouTubePlayerButton"/> | ||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:yt="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/youtube_controls_bottom_ui_container" | ||
android:layout_width="match_parent" android:layout_height="wrap_content" | ||
android:layoutDirection="ltr"> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/speed_dialog_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_speed_dialog_title" | ||
android:src="@drawable/revanced_speed_icon" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_copy_video_url_title" | ||
android:src="@drawable/revanced_copy_icon" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_timestamp_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_copy_video_url_timestamp_title" | ||
android:src="@drawable/revanced_copy_icon_with_time" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/mute_volume_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/mute_volume_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_mute_volume_title" | ||
android:src="@drawable/mute_volume_button" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/whitelist_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/whitelist_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_whitelist_title" | ||
android:src="@drawable/revanced_whitelist_icon" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/time_ordered_playlist_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/time_ordered_playlist_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_time_ordered_playlist_title" | ||
android:src="@drawable/revanced_time_ordered_playlist_icon" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/always_repeat_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_always_repeat_title" | ||
android:src="@drawable/revanced_repeat_icon" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/external_download_button" | ||
style="@style/YouTubePlayerButton"/> | ||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/external_download_button" | ||
android:paddingLeft="0.0dip" | ||
android:paddingTop="22.0dip" | ||
android:paddingRight="0.0dip" | ||
android:paddingBottom="22.0dip" | ||
android:longClickable="false" | ||
android:layout_width="48.0dip" | ||
android:layout_height="48.0dip" | ||
android:contentDescription="@string/revanced_overlay_button_external_downloader_title" | ||
android:src="@drawable/revanced_download_icon" | ||
android:scaleType="center" | ||
yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" | ||
yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" | ||
style="@style/YouTubePlayerButton"/> | ||
</android.support.constraint.ConstraintLayout> |
Binary file added
BIN
+1.37 KB
...utube/overlaybuttons/thin/drawable-hdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.83 KB
...e/overlaybuttons/thin/drawable-hdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+993 Bytes
...utube/overlaybuttons/thin/drawable-mdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.15 KB
...e/overlaybuttons/thin/drawable-mdpi/revanced_overlay_button_mute_volume_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.02 KB
...tube/overlaybuttons/thin/drawable-xhdpi/revanced_overlay_button_mute_volume.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.47 KB
.../overlaybuttons/thin/drawable-xhdpi/revanced_overlay_button_mute_volume_off.png
Oops, something went wrong.
Binary file added
BIN
+3.11 KB
...ube/overlaybuttons/thin/drawable-xxhdpi/revanced_overlay_button_mute_volume.png
Oops, something went wrong.
Binary file added
BIN
+3.83 KB
...overlaybuttons/thin/drawable-xxhdpi/revanced_overlay_button_mute_volume_off.png
Oops, something went wrong.
Binary file added
BIN
+1.89 KB
...be/overlaybuttons/thin/drawable-xxxhdpi/revanced_overlay_button_mute_volume.png
Oops, something went wrong.
Binary file added
BIN
+1.93 KB
...verlaybuttons/thin/drawable-xxxhdpi/revanced_overlay_button_mute_volume_off.png
Oops, something went wrong.
Oops, something went wrong.