summaryrefslogtreecommitdiff
path: root/core/java/android/text/Layout.java
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2011-08-10 16:31:58 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2011-08-15 13:18:34 -0700
commit8059e0903e36cbb5cf8b5c5d5d653acc9bbc8402 (patch)
treefba90001b825ca2d8c7102659d915b02caa3b7b9 /core/java/android/text/Layout.java
parentb2a85b69ce98a312c450849dfd18bd1f878b5d66 (diff)
Fix bug #3388534 Long file names are improperly displayed when played
- force ellipsising when there are more lines found than maxLines - do not care about lines when we have reached maxLines - also fix relayouting when changing maxLines thru setMaxLines() - do not allow START / MIDDLE ellipsis when there are multiple lines (and print a log accordingly) Change-Id: I90f5a7f5200a220aceee01fb7300bec2c4c3a075
Diffstat (limited to 'core/java/android/text/Layout.java')
-rw-r--r--core/java/android/text/Layout.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index eabeef0611e0..421e9959bd55 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -880,6 +880,10 @@ public abstract class Layout {
}
}
Directions directions = getLineDirections(line);
+ // Returned directions can actually be null
+ if (directions == null) {
+ return 0f;
+ }
int dir = getParagraphDirection(line);
TextLine tl = TextLine.obtain();
@@ -1781,17 +1785,6 @@ public abstract class Layout {
}
}
- /**
- * Inform this layout that not all of its lines will be displayed, because a maximum number of
- * lines has been set on the associated TextView.
- *
- * A non strictly positive value means that all lines are displayed.
- *
- * @param lineCount number of visible lines
- * @hide
- */
- public void setMaximumVisibleLineCount(int lineCount) {}
-
private CharSequence mText;
private TextPaint mPaint;
/* package */ TextPaint mWorkPaint;