Update UI for gesture settings.
1. Add list divider between each gesture preference 2. Increase top-padding from 16dp to 24dp 3. Move fingerprint swipe preference to the top of the list 4. Change default value for fingerprint swipe to OFF. Bug: 30416729 Change-Id: If0a6ee080defb2e3dbd36fbda6e047c23a1b1026
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
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:paddingTop="16dp"
|
android:paddingTop="24dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||||
|
@@ -19,6 +19,12 @@
|
|||||||
android:title="@string/gesture_preference_title"
|
android:title="@string/gesture_preference_title"
|
||||||
settings:keywords="@string/keywords_gesture">
|
settings:keywords="@string/keywords_gesture">
|
||||||
|
|
||||||
|
<com.android.settings.gestures.GesturePreference
|
||||||
|
android:key="gesture_swipe_down_fingerprint"
|
||||||
|
android:title="@string/fingerprint_swipe_for_notifications_title"
|
||||||
|
android:summary="@string/fingerprint_swipe_for_notifications_summary"
|
||||||
|
settings:animation="@raw/gesture_fingerprint_swipe"/>
|
||||||
|
|
||||||
<com.android.settings.gestures.GesturePreference
|
<com.android.settings.gestures.GesturePreference
|
||||||
android:key="gesture_double_tap_power"
|
android:key="gesture_double_tap_power"
|
||||||
android:title="@string/double_tap_power_for_camera_title"
|
android:title="@string/double_tap_power_for_camera_title"
|
||||||
@@ -37,10 +43,4 @@
|
|||||||
android:summary="@string/ambient_display_summary"
|
android:summary="@string/ambient_display_summary"
|
||||||
settings:animation="@raw/gesture_ambient_tap"/>
|
settings:animation="@raw/gesture_ambient_tap"/>
|
||||||
|
|
||||||
<com.android.settings.gestures.GesturePreference
|
|
||||||
android:key="gesture_swipe_down_fingerprint"
|
|
||||||
android:title="@string/fingerprint_swipe_for_notifications_title"
|
|
||||||
android:summary="@string/fingerprint_swipe_for_notifications_summary"
|
|
||||||
settings:animation="@raw/gesture_fingerprint_swipe"/>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
@@ -97,8 +97,6 @@ public final class GesturePreference extends SwitchPreference implements
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(PreferenceViewHolder holder) {
|
public void onBindViewHolder(PreferenceViewHolder holder) {
|
||||||
super.onBindViewHolder(holder);
|
super.onBindViewHolder(holder);
|
||||||
holder.setDividerAllowedAbove(false);
|
|
||||||
holder.setDividerAllowedBelow(false);
|
|
||||||
final TextureView video = (TextureView) holder.findViewById(R.id.gesture_video);
|
final TextureView video = (TextureView) holder.findViewById(R.id.gesture_video);
|
||||||
final ImageView imageView = (ImageView) holder.findViewById(R.id.gesture_image);
|
final ImageView imageView = (ImageView) holder.findViewById(R.id.gesture_image);
|
||||||
final ImageView playButton = (ImageView) holder.findViewById(R.id.gesture_play_button);
|
final ImageView playButton = (ImageView) holder.findViewById(R.id.gesture_play_button);
|
||||||
|
@@ -197,7 +197,7 @@ public class GestureSettings extends SettingsPreferenceFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isSystemUINavigationEnabled(Context context) {
|
private static boolean isSystemUINavigationEnabled(Context context) {
|
||||||
return Secure.getInt(context.getContentResolver(), Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 1)
|
return Secure.getInt(context.getContentResolver(), Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0)
|
||||||
== 1;
|
== 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user