Home
last modified time | relevance | path

Searched refs:Layout (Results 1 – 25 of 106) sorted by relevance

12345

/frameworks/base/apct-tests/perftests/core/src/android/text/
DStaticLayoutPerfTest.java74 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_FixedText_NoStyle_Greedy_NoHyphenation()
75 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_FixedText_NoStyle_Greedy_NoHyphenation()
89 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_RandomText_NoStyled_Greedy_NoHyphenation()
90 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_RandomText_NoStyled_Greedy_NoHyphenation()
104 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_RandomText_NoStyled_Greedy_Hyphenation()
105 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_RandomText_NoStyled_Greedy_Hyphenation()
119 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_RandomText_NoStyled_Balanced_NoHyphenation()
120 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_RandomText_NoStyled_Balanced_NoHyphenation()
134 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_RandomText_NoStyled_Balanced_Hyphenation()
135 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_RandomText_NoStyled_Balanced_Hyphenation()
[all …]
DPrecomputedTextPerfTest.java57 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_NoStyled_Hyphenation()
58 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_NoStyled_Hyphenation()
74 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_NoStyled_NoHyphenation()
75 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_NoStyled_NoHyphenation()
91 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_NoStyled_Hyphenation_WidthOnly()
92 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_NoStyled_Hyphenation_WidthOnly()
108 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_NoStyled_NoHyphenation_WidthOnly()
109 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_NoStyled_NoHyphenation_WidthOnly()
125 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_Styled_Hyphenation()
126 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_Styled_Hyphenation()
[all …]
DPrecomputedTextMemoryUsageTest.java66 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testMemoryUsage_Latin_NoHyphenation()
67 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testMemoryUsage_Latin_NoHyphenation()
84 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testMemoryUsage_Latin_Hyphenation()
85 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testMemoryUsage_Latin_Hyphenation()
102 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testMemoryUsage_CJK_NoHyphenation()
103 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testMemoryUsage_CJK_NoHyphenation()
120 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testMemoryUsage_CJK_Hyphenation()
121 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testMemoryUsage_CJK_Hyphenation()
139 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testMemoryUsage_Arabic_NoHyphenation()
140 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testMemoryUsage_Arabic_NoHyphenation()
[all …]
/frameworks/base/core/java/android/text/
DAndroidBidi.java25 import android.text.Layout.Directions;
78 case Layout.DIR_REQUEST_LTR: paraLevel = Bidi.LTR; break; in bidi()
79 case Layout.DIR_REQUEST_RTL: paraLevel = Bidi.RTL; break; in bidi()
80 case Layout.DIR_REQUEST_DEFAULT_LTR: paraLevel = Bidi.LEVEL_DEFAULT_LTR; break; in bidi()
81 case Layout.DIR_REQUEST_DEFAULT_RTL: paraLevel = Bidi.LEVEL_DEFAULT_RTL; break; in bidi()
91 return (result & 0x1) == 0 ? Layout.DIR_LEFT_TO_RIGHT : Layout.DIR_RIGHT_TO_LEFT; in bidi()
109 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in directions()
112 int baseLevel = dir == Layout.DIR_LEFT_TO_RIGHT ? 0 : 1; in directions()
149 return Layout.DIRS_ALL_RIGHT_TO_LEFT; in directions()
151 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in directions()
[all …]
DPrecomputedText.java93 private final @Layout.BreakStrategy int mBreakStrategy;
96 private final @Layout.HyphenationFrequency int mHyphenationFrequency;
109 private @Layout.BreakStrategy int mBreakStrategy = Layout.BREAK_STRATEGY_HIGH_QUALITY;
112 private @Layout.HyphenationFrequency int mHyphenationFrequency =
113 Layout.HYPHENATION_FREQUENCY_NORMAL;
144 public Builder setBreakStrategy(@Layout.BreakStrategy int strategy) { in setBreakStrategy()
159 public Builder setHyphenationFrequency(@Layout.HyphenationFrequency int frequency) { in setHyphenationFrequency()
192 @Layout.BreakStrategy int strategy, @Layout.HyphenationFrequency int frequency) { in Params()
222 public @Layout.BreakStrategy int getBreakStrategy() { in getBreakStrategy()
231 public @Layout.HyphenationFrequency int getHyphenationFrequency() { in getHyphenationFrequency()
[all …]
DSelection.java198 public static boolean moveUp(Spannable text, Layout layout) { in moveUp()
232 private static void setSelectionAndMemory(Spannable text, Layout layout, int line, int end, in setSelectionAndMemory()
269 public static boolean moveDown(Spannable text, Layout layout) { in moveDown()
305 public static boolean moveLeft(Spannable text, Layout layout) { in moveLeft()
330 public static boolean moveRight(Spannable text, Layout layout) { in moveRight()
353 public static boolean extendUp(Spannable text, Layout layout) { in extendUp()
372 public static boolean extendDown(Spannable text, Layout layout) { in extendDown()
391 public static boolean extendLeft(Spannable text, Layout layout) { in extendLeft()
407 public static boolean extendRight(Spannable text, Layout layout) { in extendRight()
419 public static boolean extendToLeftEdge(Spannable text, Layout layout) { in extendToLeftEdge()
[all …]
DMeasuredParagraph.java29 import android.text.Layout.Directions;
98 private @Layout.Direction int mParaDir;
179 public @Layout.Direction int getParagraphDir() { in getParagraphDir()
191 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in getDirections()
478 mParaDir = Layout.DIR_LEFT_TO_RIGHT; in resetAndAnalyzeBidi()
483 bidiRequest = Layout.DIR_REQUEST_LTR; in resetAndAnalyzeBidi()
485 bidiRequest = Layout.DIR_REQUEST_RTL; in resetAndAnalyzeBidi()
487 bidiRequest = Layout.DIR_REQUEST_DEFAULT_LTR; in resetAndAnalyzeBidi()
489 bidiRequest = Layout.DIR_REQUEST_DEFAULT_RTL; in resetAndAnalyzeBidi()
492 bidiRequest = isRtl ? Layout.DIR_REQUEST_RTL : Layout.DIR_REQUEST_LTR; in resetAndAnalyzeBidi()
DBoringLayout.java38 public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback {
234 if (source instanceof String && align == Layout.Alignment.ALIGN_NORMAL) { in init()
261 line.set(paint, source, 0, source.length(), Layout.DIR_LEFT_TO_RIGHT, in init()
262 Layout.DIRS_ALL_LEFT_TO_RIGHT, false, null, in init()
362 line.set(paint, text, 0, textLength, Layout.DIR_LEFT_TO_RIGHT, in isBoring()
363 Layout.DIRS_ALL_LEFT_TO_RIGHT, false, null, in isBoring()
425 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in getLineDirections()
/frameworks/base/apct-tests/perftests/core/src/android/widget/
DTextViewPrecomputedTextPerfTest.java28 import android.text.Layout;
92 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testNewLayout_RandomText()
93 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL); in testNewLayout_RandomText()
112 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testNewLayout_RandomText_Selectable()
113 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL); in testNewLayout_RandomText_Selectable()
130 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testNewLayout_PrecomputedText()
131 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED).build(); in testNewLayout_PrecomputedText()
152 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testNewLayout_PrecomputedText_Selectable()
153 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED).build(); in testNewLayout_PrecomputedText_Selectable()
176 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testSetText_RandomText()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DLayoutTest.java34 import android.text.Layout.Alignment;
60 private Layout.Alignment mAlign;
89 Layout layout = new MockLayout(text, mTextPaint, mWidth, in testGetText()
99 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetPaint()
110 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, in testGetWidth()
120 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 15, in testGetEllipsizedWidth()
130 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testIncreaseWidthTo()
149 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetHeight()
156 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetAlignment()
166 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, -1, mSpacingAdd); in testGetSpacingMultiplier()
[all …]
DStaticLayoutTest.java19 import static android.text.Layout.Alignment.ALIGN_NORMAL;
29 import android.text.Layout.Alignment;
112 Layout l = b.build(); in testGetters1()
118 assertEquals(Layout.DIR_LEFT_TO_RIGHT, l.getParagraphDirection(0)); in testGetters1()
120 assertEquals(Layout.DIRS_ALL_LEFT_TO_RIGHT, l.getLineDirections(0)); in testGetters1()
136 Layout l = b.build(); in testLineMetrics_withPadding()
152 Layout l = b.build(); in testLineMetrics_withPaddingAndWidth()
172 Layout l = b.build(); in testLineMetrics_withThreeLines()
202 Layout l = b.build(); in testLineMetrics_withLargeText()
225 Layout l = b.build(); in testLineMetrics_withSpacingAdd()
[all …]
DStaticLayoutDirectionsTest.java22 import android.text.Layout.Directions;
140 Layout l = b.build(); in testTrailingWhitespace()
145 Directions expected = dirs(0, LVL1_1, 1, LVL2_1, 2, 3 | (1 << Layout.RUN_LEVEL_SHIFT)); in testTrailingWhitespace()
161 Layout l = b.build(); in testNextToRightOf()
178 Layout l = b.build(); in testNextToLeftOf()
204 private void checkDirections(Layout l, int i, String text, in checkDirections()
DTextLineTest.java28 import android.text.Layout.TabStops;
49 tl.set(paint, line, 0, line.length(), Layout.DIR_LEFT_TO_RIGHT, in stretchesToFullWidth()
50 Layout.DIRS_ALL_LEFT_TO_RIGHT, false /* hasTabs */, null /* tabStops */, in stretchesToFullWidth()
101 Layout layout = in getTextLine()
278 tl.set(new TextPaint(), text, 0, text.length(), 1, Layout.DIRS_ALL_LEFT_TO_RIGHT, in testHandleRun_ellipsizedReplacementSpan_isSkipped()
294 tl.set(new TextPaint(), text, 0, text.length(), 1, Layout.DIRS_ALL_LEFT_TO_RIGHT, in testHandleRun_notEllipsizedReplacementSpan_isNotSkipped()
310 tl.set(new TextPaint(), text, 0, text.length(), 1, Layout.DIRS_ALL_LEFT_TO_RIGHT, in testHandleRun_halfEllipsizedReplacementSpan_isNotSkipped()
DMeasuredParagraphTest.java71 assertEquals(Layout.DIR_LEFT_TO_RIGHT, mt.getParagraphDir()); in buildForBidi()
102 assertEquals(Layout.DIR_LEFT_TO_RIGHT, mt.getParagraphDir()); in buildForMeasurement()
119 assertEquals(Layout.DIR_RIGHT_TO_LEFT, mt2.getParagraphDir()); in buildForMeasurement()
142 assertEquals(Layout.DIR_LEFT_TO_RIGHT, mt.getParagraphDir()); in buildForStaticLayout()
157 assertEquals(Layout.DIR_RIGHT_TO_LEFT, mt2.getParagraphDir()); in buildForStaticLayout()
/frameworks/base/core/java/android/text/style/
DAlignmentSpan.java21 import android.text.Layout;
35 Layout.Alignment getAlignment(); in getAlignment()
57 private final Layout.Alignment mAlignment;
62 public Standard(@NonNull Layout.Alignment align) { in Standard()
70 mAlignment = Layout.Alignment.valueOf(src.readString()); in Standard()
101 public Layout.Alignment getAlignment() { in getAlignment()
DLeadingMarginSpan.java22 import android.text.Layout;
71 boolean first, Layout layout); in drawLeadingMargin()
158 boolean first, Layout layout) { in drawLeadingMargin()
/frameworks/minikin/libs/minikin/
DLayout.cpp48 void Layout::doLayout(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in doLayout()
60 float Layout::measureText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in measureText()
73 float Layout::doLayoutRunCached(const U16StringPiece& textBuf, const Range& range, bool isRtl, in doLayoutRunCached()
76 Layout* layout, float* advances) { in doLayoutRunCached()
99 LayoutAppendFunctor(Layout* layout, float* advances, float* totalAdvance, uint32_t outOffset, in LayoutAppendFunctor()
121 Layout* mLayout;
128 float Layout::doLayoutWord(const uint16_t* buf, size_t start, size_t count, size_t bufSize, in doLayoutWord()
130 StartHyphenEdit startHyphen, EndHyphenEdit endHyphen, Layout* layout, in doLayoutWord()
149 void Layout::appendLayout(const LayoutPiece& src, size_t start, float extraAdvance) { in appendLayout()
167 void Layout::purgeCaches() { in purgeCaches()
[all …]
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp64 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
82 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
100 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
118 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
148 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
166 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
185 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
205 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
238 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
256 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F()
[all …]
/frameworks/base/core/java/android/text/method/
DArrowKeyMovementMethod.java20 import android.text.Layout;
38 private static int getCurrentLineTop(Spannable buffer, Layout layout) { in getCurrentLineTop()
70 final Layout layout = widget.getLayout(); in left()
80 final Layout layout = widget.getLayout(); in right()
90 final Layout layout = widget.getLayout(); in up()
100 final Layout layout = widget.getLayout(); in down()
110 final Layout layout = widget.getLayout(); in pageUp()
134 final Layout layout = widget.getLayout(); in pageDown()
178 final Layout layout = widget.getLayout(); in lineStart()
188 final Layout layout = widget.getLayout(); in lineEnd()
DBaseMovementMethod.java19 import android.text.Layout;
423 final Layout layout = widget.getLayout(); in getScrollBoundsLeft()
440 final Layout layout = widget.getLayout(); in getScrollBoundsRight()
509 final Layout layout = widget.getLayout(); in scrollUp()
536 final Layout layout = widget.getLayout(); in scrollDown()
566 final Layout layout = widget.getLayout(); in scrollPageUp()
586 final Layout layout = widget.getLayout(); in scrollPageDown()
608 final Layout layout = widget.getLayout(); in scrollTop()
626 final Layout layout = widget.getLayout(); in scrollBottom()
/frameworks/minikin/include/minikin/
DLayout.h33 class Layout; variable
66 class Layout {
68 Layout(const U16StringPiece& str, const Range& range, Bidi bidiFlags, const MinikinPaint& paint, in Layout() function
74 Layout(uint32_t count) : mAdvance(0) { in Layout() function
119 Layout* layout, float* advances);
124 StartHyphenEdit startHyphen, EndHyphenEdit endHyphen, Layout* layout,
/frameworks/base/core/java/com/android/internal/widget/
DImageFloatingTextView.java22 import android.text.Layout;
66 protected Layout makeSingleLayout(int wantWidth, BoringLayout.Metrics boring, int ellipsisWidth, in makeSingleLayout()
67 Layout.Alignment alignment, boolean shouldEllipsize, in makeSingleLayout()
82 .setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY) in makeSingleLayout()
83 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL); in makeSingleLayout()
129 Layout layout = getLayout(); in onMeasure()
/frameworks/base/libs/hwui/hwui/
DMinikinUtils.h45 ANDROID_API static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags,
59 ANDROID_API static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout);
61 ANDROID_API static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout,
65 ANDROID_API static void forFontRun(const minikin::Layout& layout, Paint* paint, F& f) { in forFontRun()
DMinikinUtils.cpp51 minikin::Layout MinikinUtils::doLayout(const Paint* paint, minikin::Bidi bidiFlags, in doLayout()
65 return minikin::Layout(textBuf.substr(contextRange), range - contextStart, bidiFlags, in doLayout()
81 return minikin::Layout::measureText(textBuf, range, bidiFlags, minikinPaint, startHyphen, in measureText()
90 float MinikinUtils::xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout) { in xOffsetForTextAlign()
104 float MinikinUtils::hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout, in hOffsetForTextAlign()
/frameworks/layoutlib/bridge/src/android/graphics/text/
DLineBreaker_Delegate.java25 import android.text.Layout;
26 import android.text.Layout.BreakStrategy;
27 import android.text.Layout.HyphenationFrequency;
124 case Layout.BREAK_STRATEGY_SIMPLE: in nComputeLineBreaks()
128 case Layout.BREAK_STRATEGY_HIGH_QUALITY: in nComputeLineBreaks()
131 case Layout.BREAK_STRATEGY_BALANCED: in nComputeLineBreaks()

12345