Fixed blue buttons with blue text

This commit is contained in:
ByteHamster 2020-05-10 16:19:48 +02:00
parent c0bca81cc6
commit 421f75ca8a
4 changed files with 21 additions and 19 deletions

View File

@ -80,7 +80,7 @@ public class PlaybackControlsDialog extends DialogFragment {
private void setupUi() { private void setupUi() {
final SeekBar barPlaybackSpeed = dialog.findViewById(R.id.playback_speed); final SeekBar barPlaybackSpeed = dialog.findViewById(R.id.playback_speed);
final Button butDecSpeed = dialog.findViewById(R.id.butDecSpeed); final TextView butDecSpeed = dialog.findViewById(R.id.butDecSpeed);
butDecSpeed.setOnClickListener(v -> { butDecSpeed.setOnClickListener(v -> {
if (controller != null && controller.canSetPlaybackSpeed()) { if (controller != null && controller.canSetPlaybackSpeed()) {
barPlaybackSpeed.setProgress(barPlaybackSpeed.getProgress() - 2); barPlaybackSpeed.setProgress(barPlaybackSpeed.getProgress() - 2);
@ -88,7 +88,7 @@ public class PlaybackControlsDialog extends DialogFragment {
VariableSpeedDialog.showGetPluginDialog(getContext()); VariableSpeedDialog.showGetPluginDialog(getContext());
} }
}); });
final Button butIncSpeed = (Button) dialog.findViewById(R.id.butIncSpeed); final TextView butIncSpeed = dialog.findViewById(R.id.butIncSpeed);
butIncSpeed.setOnClickListener(v -> { butIncSpeed.setOnClickListener(v -> {
if (controller != null && controller.canSetPlaybackSpeed()) { if (controller != null && controller.canSetPlaybackSpeed()) {
barPlaybackSpeed.setProgress(barPlaybackSpeed.getProgress() + 2); barPlaybackSpeed.setProgress(barPlaybackSpeed.getProgress() + 2);

View File

@ -41,18 +41,22 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal"
android:gravity="center_vertical">
<Button <TextView
android:id="@+id/butDecSpeed" android:id="@+id/butDecSpeed"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:gravity="center" android:gravity="center"
android:text="-" android:text="-"
android:clickable="true"
android:focusable="true"
android:textStyle="bold" android:textStyle="bold"
android:textColor="?attr/colorAccent"
android:textSize="24sp" android:textSize="24sp"
android:background="?attr/selectableItemBackgroundBorderless" /> android:textColor="?attr/colorSecondary"
android:contentDescription="@string/decrease_volume"
android:background="?attr/selectableItemBackgroundBorderless"/>
<SeekBar <SeekBar
android:id="@+id/playback_speed" android:id="@+id/playback_speed"
@ -61,16 +65,18 @@
android:max="70" android:max="70"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <TextView
android:id="@+id/butIncSpeed" android:id="@+id/butIncSpeed"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:minWidth="0dp"
android:gravity="center" android:gravity="center"
android:text="+" android:text="+"
android:clickable="true"
android:focusable="true"
android:textStyle="bold" android:textStyle="bold"
android:textColor="?attr/colorAccent"
android:textSize="24sp" android:textSize="24sp"
android:textColor="?attr/colorSecondary"
android:contentDescription="@string/increase_volume"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
</LinearLayout> </LinearLayout>

View File

@ -50,21 +50,15 @@
android:id="@+id/butCancel" android:id="@+id/butCancel"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" android:text="@string/cancel_label"
android:textColor="?attr/colorAccent" style="@style/Widget.MaterialComponents.Button.TextButton"/>
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="@string/cancel_label"/>
<Button <Button
android:id="@+id/butConfirm" android:id="@+id/butConfirm"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" android:text="@string/confirm_label"
android:textColor="?attr/colorAccent" style="@style/Widget.MaterialComponents.Button.TextButton"/>
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="@string/confirm_label"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -671,6 +671,8 @@
<!-- Content descriptions for image buttons --> <!-- Content descriptions for image buttons -->
<string name="rewind_label">Rewind</string> <string name="rewind_label">Rewind</string>
<string name="fast_forward_label">Fast forward</string> <string name="fast_forward_label">Fast forward</string>
<string name="increase_volume">Increase volume</string>
<string name="decrease_volume">Decrease volume</string>
<string name="media_type_audio_label">Audio</string> <string name="media_type_audio_label">Audio</string>
<string name="media_type_video_label">Video</string> <string name="media_type_video_label">Video</string>
<string name="navigate_upwards_label">Navigate upwards</string> <string name="navigate_upwards_label">Navigate upwards</string>