diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java index baaba15fe..b833c7788 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java @@ -56,6 +56,8 @@ import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.SeekBar; import android.widget.TextView; +import android.widget.Toast; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; @@ -646,6 +648,12 @@ public class VideoPlayerImpl extends VideoPlayer public void onBlockingSponsorsButtonClicked() { super.onBlockingSponsorsButtonClicked(); setBlockSponsorsButton(blockSponsorsButton, isBlockingSponsors()); + + Toast.makeText(context, + isBlockingSponsors() + ? "SponsorBlock enabled" + : "SponsorBlock disabled", + Toast.LENGTH_SHORT).show(); } @Override @@ -1591,8 +1599,8 @@ public class VideoPlayerImpl extends VideoPlayer protected void setBlockSponsorsButton(final ImageButton button, final boolean isBlockingSponsors) { button.setImageDrawable(AppCompatResources.getDrawable(service, isBlockingSponsors - ? R.drawable.ic_sponsorblock_disable_white_24dp - : R.drawable.ic_sponsorblock_enable_white_24dp)); + ? R.drawable.ic_sponsor_block_enable_white_24dp + : R.drawable.ic_sponsor_block_disable_white_24dp)); } /** diff --git a/app/src/main/res/drawable/ic_sponsor_block_disable_black_24dp.xml b/app/src/main/res/drawable/ic_sponsor_block_disable_black_24dp.xml new file mode 100644 index 000000000..dcadfeb66 --- /dev/null +++ b/app/src/main/res/drawable/ic_sponsor_block_disable_black_24dp.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_sponsor_block_disable_white_24dp.xml b/app/src/main/res/drawable/ic_sponsor_block_disable_white_24dp.xml new file mode 100644 index 000000000..6cc8cd3b4 --- /dev/null +++ b/app/src/main/res/drawable/ic_sponsor_block_disable_white_24dp.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_sponsor_block_enable_black_24dp.xml b/app/src/main/res/drawable/ic_sponsor_block_enable_black_24dp.xml new file mode 100644 index 000000000..f5abd06ac --- /dev/null +++ b/app/src/main/res/drawable/ic_sponsor_block_enable_black_24dp.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_sponsor_block_enable_white_24dp.xml b/app/src/main/res/drawable/ic_sponsor_block_enable_white_24dp.xml new file mode 100644 index 000000000..2bda0ba7b --- /dev/null +++ b/app/src/main/res/drawable/ic_sponsor_block_enable_white_24dp.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/drawable/ic_sponsorblock_disable_white_24dp.xml b/app/src/main/res/drawable/ic_sponsorblock_disable_white_24dp.xml deleted file mode 100644 index 2d7730aaa..000000000 --- a/app/src/main/res/drawable/ic_sponsorblock_disable_white_24dp.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_sponsorblock_enable_white_24dp.xml b/app/src/main/res/drawable/ic_sponsorblock_enable_white_24dp.xml deleted file mode 100644 index 58448ed0c..000000000 --- a/app/src/main/res/drawable/ic_sponsorblock_enable_white_24dp.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/app/src/main/res/layout/player.xml b/app/src/main/res/layout/player.xml index 4858161dc..571a2fca9 100644 --- a/app/src/main/res/layout/player.xml +++ b/app/src/main/res/layout/player.xml @@ -315,7 +315,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_sponsorblock_disable_white_24dp" + app:srcCompat="@drawable/ic_sponsor_block_disable_white_24dp" android:background="?attr/selectableItemBackground" android:contentDescription="@string/sponsorblock_toggle_skipping" tools:ignore="RtlHardcoded" /> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index cbf538fb5..a22ee1814 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -82,6 +82,8 @@ + + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 9a81d01e1..b8b6864fb 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -97,6 +97,8 @@ @drawable/ic_sort_black_24dp @drawable/ic_help_black_24dp @drawable/ic_arrow_back_black_24dp + @drawable/ic_sponsor_block_enable_black_24dp + @drawable/ic_sponsor_block_disable_black_24dp @color/light_separator_color @color/light_contrast_background_color @@ -204,6 +206,8 @@ @drawable/ic_sort_white_24dp @drawable/ic_help_white_24dp @drawable/ic_arrow_back_white_24dp + @drawable/ic_sponsor_block_enable_white_24dp + @drawable/ic_sponsor_block_disable_white_24dp @color/dark_separator_color @color/dark_contrast_background_color