Merge "Volume: Mark inactive sliders as focusable." into mnc-dev

This commit is contained in:
John Spurlock
2015-06-30 14:22:21 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 5 deletions

View File

@@ -50,6 +50,8 @@
android:layout_below="@id/volume_row_header"
android:layout_toEndOf="@id/volume_row_icon"
android:layout_toStartOf="@+id/volume_settings_button"
android:focusable="true"
android:focusableInTouchMode="true"
android:paddingEnd="8dp"
android:paddingStart="8dp" />

View File

@@ -741,12 +741,7 @@ public class VolumeDialog {
private void updateVolumeRowSliderTintH(VolumeRow row, boolean isActive) {
if (isActive && mExpanded) {
row.slider.setFocusable(true);
row.slider.setFocusableInTouchMode(true);
row.slider.requestFocus();
} else {
row.slider.setFocusableInTouchMode(false);
row.slider.setFocusable(false);
}
final ColorStateList tint = isActive && row.slider.isEnabled() ? mActiveSliderTint
: mInactiveSliderTint;