diff options
author | Dianne Hackborn <hackbod@google.com> | 2015-07-07 14:29:36 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2015-07-07 16:47:37 -0700 |
commit | 6f0fdc4167ad906fc7409856e86cd0cc601c3b53 (patch) | |
tree | b3097ee875c68282d9758f74654a61a9705f433e /core/java/android/view | |
parent | 79d9219c9f9734025837a01a6f8e490d1e0ab57e (diff) | |
download | frameworks_base-6f0fdc4167ad906fc7409856e86cd0cc601c3b53.zip frameworks_base-6f0fdc4167ad906fc7409856e86cd0cc601c3b53.tar.gz frameworks_base-6f0fdc4167ad906fc7409856e86cd0cc601c3b53.tar.bz2 |
Implement better handling of text in assist.
TextView is now much smarter about the text it reports, limiting it
to what is visible (plus a bit more). Also add a facility for it to
report where the lines of text are, both as offsets in the text string
and their baselines on screen.
Part of fixing issue #22328792: Fix scalability issues in AssistStructure
Change-Id: Idddb8c3a3331355f381e2d4af06d520fe7c7ce8e
Diffstat (limited to 'core/java/android/view')
-rw-r--r-- | core/java/android/view/ViewStructure.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java index 794622a..2e4ba74 100644 --- a/core/java/android/view/ViewStructure.java +++ b/core/java/android/view/ViewStructure.java @@ -178,6 +178,17 @@ public abstract class ViewStructure { public abstract void setTextStyle(float size, int fgColor, int bgColor, int style); /** + * Set line information for test that was previously supplied through + * {@link #setText(CharSequence)}. This provides the line breaking of the text as it + * is shown on screen. This function takes ownership of the provided arrays; you should + * not make further modification to them. + * + * @param charOffsets The offset in to {@link #setText} where a line starts. + * @param baselines The baseline where the line is drawn on screen. + */ + public abstract void setTextLines(int[] charOffsets, int[] baselines); + + /** * Set optional hint text associated with this view; this is for example the text that is * shown by an EditText when it is empty to indicate to the user the kind of text to input. */ |