diff options
| author | Shu Chen <shuchen@google.com> | 2020-05-21 11:26:32 +0800 |
|---|---|---|
| committer | Shu Chen <shuchen@google.com> | 2020-05-21 11:26:32 +0800 |
| commit | 967e14f9a7f0e99ee2581884480f49594480a88c (patch) | |
| tree | e6771d849045dee3697c2b68d83cf4546ed0171e /core/java/android/widget/WidgetFlags.java | |
| parent | 645a29959788c9a9d7ba37ef0688c4f2edcf24fe (diff) | |
Makes the line slop ratio configurable.
Bug: 157187942
Test: locally verfied.
Change-Id: I9d7f4e21bc22800350b35cbee8dbcf445f55eb1f
Diffstat (limited to 'core/java/android/widget/WidgetFlags.java')
| -rw-r--r-- | core/java/android/widget/WidgetFlags.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/widget/WidgetFlags.java b/core/java/android/widget/WidgetFlags.java index 09ab5aa17782..832dd5190d37 100644 --- a/core/java/android/widget/WidgetFlags.java +++ b/core/java/android/widget/WidgetFlags.java @@ -113,6 +113,24 @@ public final class WidgetFlags { public static final int INSERTION_HANDLE_OPACITY_DEFAULT = 50; /** + * The flag of line slop ratio applies to cursor movement. + * Note: the actual slop value is bound: lineHeight + slop within the range of {8dp..45dp}. + */ + public static final String LINE_SLOP_RATIO = + "CursorControlFeature__line_slop_ratio"; + + /** + * The key name used in app core settings for {@link #LINE_SLOP_RATIO}. + */ + public static final String KEY_LINE_SLOP_RATIO = + "widget__line_slop_ratio"; + + /** + * Default value for the flag {@link #LINE_SLOP_RATIO}. + */ + public static final float LINE_SLOP_RATIO_DEFAULT = .5f; + + /** * The flag of enabling the new magnifier. */ public static final String ENABLE_NEW_MAGNIFIER = "CursorControlFeature__enable_new_magnifier"; |
