Skip to content

Commit

Permalink
Tweak volume dialog (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
SyncedSynapse authored Sep 19, 2022
1 parent 5e27d3f commit 65de9a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ private void registerObserver() {

private void setListeners() {
binding.vcdVolumeMute.setOnClickListener(onMuteToggleOnClickListener);
binding.vcdVolumeMutedIndicator.setOnClickListener(onMuteToggleOnClickListener);

binding.vcdVolumeLevelIndicator.setOnVolumeChangeListener(
volume -> {
Expand All @@ -143,10 +142,6 @@ private void setListeners() {
@Override
public void onApplicationVolumeChanged(int volume, boolean muted) {
binding.vcdVolumeLevelIndicator.setVolume(muted, volume);

binding.vcdVolumeMutedIndicator.setVisibility(muted ? View.VISIBLE : View.GONE);
binding.vcdVolumeMutedIndicator.setHighlight(muted);

binding.vcdVolumeMute.setHighlight(muted);
}

Expand Down
14 changes: 4 additions & 10 deletions app/src/main/res/layout/volume_controller_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/default_padding"
android:paddingBottom="@dimen/default_padding"
android:paddingStart="@dimen/small_padding"
android:paddingEnd="@dimen/small_padding"
android:background="?attr/colorSurface"
android:minWidth="200dp">

Expand All @@ -15,20 +19,10 @@
android:contentDescription="@string/volume_mute"
android:src="@drawable/ic_round_volume_off_24"/>

<org.xbmc.kore.ui.widgets.HighlightButton
android:id="@+id/vcd_volume_muted_indicator"
style="@style/Widget.Kore.Button.Borderless"
android:layout_width="@dimen/default_icon_size"
android:layout_height="@dimen/default_icon_size"
android:contentDescription="@string/volume_mute"
android:src="@drawable/ic_round_volume_off_24"
android:visibility="gone"/>

<org.xbmc.kore.ui.widgets.VolumeLevelIndicator
android:id="@+id/vcd_volume_level_indicator"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_toEndOf="@id/vcd_volume_mute"
android:orientation="vertical">
</org.xbmc.kore.ui.widgets.VolumeLevelIndicator>
Expand Down

0 comments on commit 65de9a2

Please sign in to comment.