diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-03-15 21:14:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-03-15 21:14:46 +0000 |
commit | e93708bb620727df3994c877ff6df83cc17f4088 (patch) | |
tree | 0706eaee7789eadd288e8dfa953253fec72bd551 | |
parent | b5a2d11440eab84ef1ae1f44fb29b0690038c8e5 (diff) | |
parent | df13f242d3a8fdb5a224706fb01d425e8106cecd (diff) | |
download | setupwizard-e93708bb620727df3994c877ff6df83cc17f4088.tar.gz |
Merge "Make links focusableInTouchMode for platform variant" into pi-dev
-rw-r--r-- | library/platform/src/com/android/setupwizardlib/view/RichTextView.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/platform/src/com/android/setupwizardlib/view/RichTextView.java b/library/platform/src/com/android/setupwizardlib/view/RichTextView.java index 5a78561..aab3238 100644 --- a/library/platform/src/com/android/setupwizardlib/view/RichTextView.java +++ b/library/platform/src/com/android/setupwizardlib/view/RichTextView.java @@ -121,6 +121,11 @@ public class RichTextView extends TextView implements OnLinkClickListener { // as individual TextViews consume touch events and thereby reducing the focus window // shown by Talkback. Disable focus if there are no links setFocusable(hasLinks); + // Do not "reveal" (i.e. scroll to) this view when this view is focused. Since this view is + // focusable in touch mode, we may be focused when the screen is first shown, and starting + // a screen halfway scrolled down is confusing to the user. + setRevealOnFocusHint(false); + setFocusableInTouchMode(hasLinks); } private boolean hasLinks(CharSequence text) { |