Home
last modified time | relevance | path

Searched refs:layout (Results 1 – 25 of 1696) sorted by relevance

12345678910>>...68

/frameworks/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/
DSetupWizardLayoutTest.java50 SetupWizardLayout layout = new SetupWizardLayout(mContext); in testDefaultTemplate() local
51 assertDefaultTemplateInflated(layout); in testDefaultTemplate()
56 SetupWizardLayout layout = new SetupWizardLayout(mContext); in testSetHeaderText() local
57 TextView title = (TextView) layout.findViewById(R.id.suw_layout_title); in testSetHeaderText()
58 layout.setHeaderText("Abracadabra"); in testSetHeaderText()
64 SetupWizardLayout layout = new SetupWizardLayout(mContext); in testAddView() local
67 layout.addView(tv); in testAddView()
68 assertDefaultTemplateInflated(layout); in testAddView()
69 View view = layout.findViewById(R.id.test_view_id); in testAddView()
76 SetupWizardLayout layout = (SetupWizardLayout) inflater.inflate(R.layout.test_layout, null); in testInflateFromXml() local
[all …]
DGlifListLayoutTest.java49 GlifListLayout layout = new GlifListLayout(mContext); in testDefaultTemplate() local
50 assertListTemplateInflated(layout); in testDefaultTemplate()
55 GlifListLayout layout = new GlifListLayout(mContext); in testAddView() local
58 layout.addView(tv); in testAddView()
68 GlifListLayout layout = (GlifListLayout) in testInflateFromXml() local
69 inflater.inflate(R.layout.test_glif_list_layout, null); in testInflateFromXml()
70 assertListTemplateInflated(layout); in testInflateFromXml()
75 GlifListLayout layout = new GlifListLayout(mContext); in testGetListView() local
76 assertListTemplateInflated(layout); in testGetListView()
77 assertNotNull("getListView should not be null", layout.getListView()); in testGetListView()
[all …]
DGlifLayoutTest.java48 GlifLayout layout = new GlifLayout(mContext); in testDefaultTemplate() local
49 assertDefaultTemplateInflated(layout); in testDefaultTemplate()
54 GlifLayout layout = new GlifLayout(mContext); in testSetHeaderText() local
55 TextView title = (TextView) layout.findViewById(R.id.suw_layout_title); in testSetHeaderText()
56 layout.setHeaderText("Abracadabra"); in testSetHeaderText()
62 GlifLayout layout = new GlifLayout(mContext); in testAddView() local
65 layout.addView(tv); in testAddView()
66 assertDefaultTemplateInflated(layout); in testAddView()
67 View view = layout.findViewById(R.id.test_view_id); in testAddView()
74 GlifLayout layout = (GlifLayout) inflater.inflate(R.layout.test_glif_layout, null); in testInflateFromXml() local
[all …]
DSetupWizardListLayoutTest.java46 SetupWizardListLayout layout = new SetupWizardListLayout(mContext); in testDefaultTemplate() local
47 assertListTemplateInflated(layout); in testDefaultTemplate()
52 SetupWizardListLayout layout = new SetupWizardListLayout(mContext); in testAddView() local
55 layout.addView(tv); in testAddView()
65 SetupWizardListLayout layout = (SetupWizardListLayout) in testInflateFromXml() local
66 inflater.inflate(R.layout.test_list_layout, null); in testInflateFromXml()
67 assertListTemplateInflated(layout); in testInflateFromXml()
72 final SetupWizardListLayout layout = new SetupWizardListLayout(mContext); in testShowProgressBar() local
73 layout.showProgressBar(); in testShowProgressBar()
74 assertTrue("Progress bar should be shown", layout.isProgressBarShown()); in testShowProgressBar()
[all …]
DTemplateLayoutTest.java40 TemplateLayout layout = new TemplateLayout(mContext, R.layout.test_template, in testAddView() local
44 layout.addView(tv); in testAddView()
45 View view = layout.findViewById(R.id.test_view_id); in testAddView()
52 TemplateLayout layout = in testInflateFromXml() local
53 (TemplateLayout) inflater.inflate(R.layout.test_template_layout, null); in testInflateFromXml()
54 View content = layout.findViewById(R.id.test_content); in testInflateFromXml()
60 TemplateLayout layout = new TemplateLayout(mContext, R.layout.test_template, in testTemplate() local
62 View templateView = layout.findViewById(R.id.test_template_view); in testTemplate()
67 layout.addView(tv); in testTemplate()
69 templateView = layout.findViewById(R.id.test_template_view); in testTemplate()
[all …]
/frameworks/base/core/java/android/text/
DSelection.java122 public static boolean moveUp(Spannable text, Layout layout) { in moveUp() argument
138 int line = layout.getLineForOffset(end); in moveUp()
143 if (layout.getParagraphDirection(line) == in moveUp()
144 layout.getParagraphDirection(line - 1)) { in moveUp()
145 float h = layout.getPrimaryHorizontal(end); in moveUp()
146 move = layout.getOffsetForHorizontal(line - 1, h); in moveUp()
148 move = layout.getLineStart(line - 1); in moveUp()
168 public static boolean moveDown(Spannable text, Layout layout) { in moveDown() argument
184 int line = layout.getLineForOffset(end); in moveDown()
186 if (line < layout.getLineCount() - 1) { in moveDown()
[all …]
/frameworks/base/tests/DpiTest/src/com/google/android/test/dpi/
DDpiTestActivity.java85 LinearLayout layout = new LinearLayout(this); in onCreate() local
86 addBitmapDrawable(layout, R.drawable.logo120dpi, true); in onCreate()
87 addBitmapDrawable(layout, R.drawable.logo160dpi, true); in onCreate()
88 addBitmapDrawable(layout, R.drawable.logo240dpi, true); in onCreate()
90 addChildToRoot(root, layout); in onCreate()
92 layout = new LinearLayout(this); in onCreate()
93 addBitmapDrawable(layout, R.drawable.logo120dpi, false); in onCreate()
94 addBitmapDrawable(layout, R.drawable.logo160dpi, false); in onCreate()
95 addBitmapDrawable(layout, R.drawable.logo240dpi, false); in onCreate()
97 addChildToRoot(root, layout); in onCreate()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DStaticLayoutTextMeasuringTest.java44 StaticLayout layout = new StaticLayout(testString, mDefaultPaint, in testGetPrimaryHorizontal_zwnbsp() local
47 assertEquals(0.0f, layout.getPrimaryHorizontal(0)); in testGetPrimaryHorizontal_zwnbsp()
48 assertEquals(layout.getPrimaryHorizontal(2), layout.getPrimaryHorizontal(1)); in testGetPrimaryHorizontal_zwnbsp()
54 StaticLayout layout = new StaticLayout(testString, mDefaultPaint, in testGetPrimaryHorizontal_devanagari() local
57 assertEquals(0.0f, layout.getPrimaryHorizontal(0)); in testGetPrimaryHorizontal_devanagari()
58 assertEquals(layout.getPrimaryHorizontal(2), layout.getPrimaryHorizontal(1)); in testGetPrimaryHorizontal_devanagari()
66 StaticLayout layout = new StaticLayout(testString, mDefaultPaint, in testGetPrimaryHorizontal_flagEmoji() local
69 assertEquals(0.0f, layout.getPrimaryHorizontal(0)); in testGetPrimaryHorizontal_flagEmoji()
70 assertEquals(layout.getPrimaryHorizontal(4), layout.getPrimaryHorizontal(1)); in testGetPrimaryHorizontal_flagEmoji()
71 assertEquals(layout.getPrimaryHorizontal(4), layout.getPrimaryHorizontal(2)); in testGetPrimaryHorizontal_flagEmoji()
[all …]
/frameworks/opt/setupwizard/library/full-support/test/src/com/android/setupwizardlib/test/
DGlifPreferenceLayoutTest.java46 GlifPreferenceLayout layout = new TestLayout(mContext); in testDefaultTemplate() local
47 assertPreferenceTemplateInflated(layout); in testDefaultTemplate()
52 GlifPreferenceLayout layout = new TestLayout(mContext); in testGetRecyclerView() local
53 assertPreferenceTemplateInflated(layout); in testGetRecyclerView()
54 assertNotNull("getRecyclerView should not be null", layout.getRecyclerView()); in testGetRecyclerView()
59 GlifPreferenceLayout layout = new TestLayout(mContext); in testOnCreateRecyclerView() local
60 assertPreferenceTemplateInflated(layout); in testOnCreateRecyclerView()
61 final RecyclerView recyclerView = layout.onCreateRecyclerView(LayoutInflater.from(mContext), in testOnCreateRecyclerView()
62 layout, null /* savedInstanceState */); in testOnCreateRecyclerView()
68 GlifPreferenceLayout layout = new TestLayout(mContext); in testDividerInset() local
[all …]
DSetupWizardPreferenceLayoutTest.java46 SetupWizardPreferenceLayout layout = new TestLayout(mContext); in testDefaultTemplate() local
47 assertPreferenceTemplateInflated(layout); in testDefaultTemplate()
52 SetupWizardPreferenceLayout layout = new TestLayout(mContext); in testGetRecyclerView() local
53 assertPreferenceTemplateInflated(layout); in testGetRecyclerView()
54 assertNotNull("getRecyclerView should not be null", layout.getRecyclerView()); in testGetRecyclerView()
59 SetupWizardPreferenceLayout layout = new TestLayout(mContext); in testOnCreateRecyclerView() local
60 assertPreferenceTemplateInflated(layout); in testOnCreateRecyclerView()
61 final RecyclerView recyclerView = layout.onCreateRecyclerView(LayoutInflater.from(mContext), in testOnCreateRecyclerView()
62 layout, null /* savedInstanceState */); in testOnCreateRecyclerView()
68 SetupWizardPreferenceLayout layout = new TestLayout(mContext); in testDividerInset() local
[all …]
DGlifRecyclerLayoutTest.java46 GlifRecyclerLayout layout = new TestLayout(mContext); in testDefaultTemplate() local
47 assertRecyclerTemplateInflated(layout); in testDefaultTemplate()
53 GlifRecyclerLayout layout = (GlifRecyclerLayout) in testInflateFromXml() local
54 inflater.inflate(R.layout.test_glif_recycler_layout, null); in testInflateFromXml()
55 assertRecyclerTemplateInflated(layout); in testInflateFromXml()
60 GlifRecyclerLayout layout = new TestLayout(mContext); in testGetRecyclerView() local
61 assertRecyclerTemplateInflated(layout); in testGetRecyclerView()
62 assertNotNull("getRecyclerView should not be null", layout.getRecyclerView()); in testGetRecyclerView()
67 GlifRecyclerLayout layout = new TestLayout(mContext); in testAdapter() local
68 assertRecyclerTemplateInflated(layout); in testAdapter()
[all …]
DSetupWizardRecyclerLayoutTest.java46 SetupWizardRecyclerLayout layout = new TestLayout(mContext); in testDefaultTemplate() local
47 assertRecyclerTemplateInflated(layout); in testDefaultTemplate()
53 SetupWizardRecyclerLayout layout = (SetupWizardRecyclerLayout) in testInflateFromXml() local
54 inflater.inflate(R.layout.test_recycler_layout, null); in testInflateFromXml()
55 assertRecyclerTemplateInflated(layout); in testInflateFromXml()
60 SetupWizardRecyclerLayout layout = new TestLayout(mContext); in testGetRecyclerView() local
61 assertRecyclerTemplateInflated(layout); in testGetRecyclerView()
62 assertNotNull("getRecyclerView should not be null", layout.getRecyclerView()); in testGetRecyclerView()
67 SetupWizardRecyclerLayout layout = new TestLayout(mContext); in testAdapter() local
68 assertRecyclerTemplateInflated(layout); in testAdapter()
[all …]
/frameworks/base/libs/hwui/hwui/
DCanvas.cpp82 DrawTextFunctor(const Layout& layout, Canvas* canvas, uint16_t* glyphs, float* pos, in DrawTextFunctor() argument
84 : layout(layout) in DrawTextFunctor()
98 glyphs[i] = layout.getGlyphId(i); in operator ()()
99 pos[2 * i] = x + layout.getX(i); in operator ()()
100 pos[2 * i + 1] = y + layout.getY(i); in operator ()()
104 glyphs[i] = layout.getGlyphId(i); in operator ()()
105 pos[2 * i] = layout.getX(i); in operator ()()
106 pos[2 * i + 1] = layout.getY(i); in operator ()()
138 const Layout& layout; member in android::DrawTextFunctor
154 Layout layout; in drawText() local
[all …]
/frameworks/base/core/java/android/text/method/
DArrowKeyMovementMethod.java38 private static int getCurrentLineTop(Spannable buffer, Layout layout) { in getCurrentLineTop() argument
39 return layout.getLineTop(layout.getLineForOffset(Selection.getSelectionEnd(buffer))); in getCurrentLineTop()
70 final Layout layout = widget.getLayout(); in left() local
72 return Selection.extendLeft(buffer, layout); in left()
74 return Selection.moveLeft(buffer, layout); in left()
80 final Layout layout = widget.getLayout(); in right() local
82 return Selection.extendRight(buffer, layout); in right()
84 return Selection.moveRight(buffer, layout); in right()
90 final Layout layout = widget.getLayout(); in up() local
92 return Selection.extendUp(buffer, layout); in up()
[all …]
DBaseMovementMethod.java423 final Layout layout = widget.getLayout(); in getScrollBoundsLeft() local
431 final int lineLeft = (int) Math.floor(layout.getLineLeft(line)); in getScrollBoundsLeft()
440 final Layout layout = widget.getLayout(); in getScrollBoundsRight() local
448 final int lineRight = (int) Math.ceil(layout.getLineRight(line)); in getScrollBoundsRight()
509 final Layout layout = widget.getLayout(); in scrollUp() local
511 int topLine = layout.getLineForVertical(top); in scrollUp()
512 if (layout.getLineTop(topLine) == top) { in scrollUp()
519 Touch.scrollTo(widget, layout, widget.getScrollX(), layout.getLineTop(topLine)); in scrollUp()
536 final Layout layout = widget.getLayout(); in scrollDown() local
539 int bottomLine = layout.getLineForVertical(bottom); in scrollDown()
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DTextGammaActivity.java37 final LinearLayout layout = new LinearLayout(this); in onCreate() local
38 layout.setOrientation(LinearLayout.VERTICAL); in onCreate()
41 layout.addView(gamma, new LinearLayout.LayoutParams( in onCreate()
45 setContentView(layout); in onCreate()
47 layout.post(new Runnable() { in onCreate()
58 layout.addView(image, new LinearLayout.LayoutParams( in onCreate()
77 inflater.inflate(R.layout.text_large, this, true); in GammaTextView()
78 inflater.inflate(R.layout.text_medium, this, true); in GammaTextView()
79 inflater.inflate(R.layout.text_small, this, true); in GammaTextView()
88 final LinearLayout layout = new LinearLayout(this); in onCreate() local
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DInflateTest.java72 inflateTest(R.layout.layout_one); in testLayout1()
77 inflateTest(R.layout.layout_two); in testLayout2()
82 inflateTest(R.layout.layout_three); in testLayout3()
87 inflateTest(R.layout.layout_four); in testLayout4()
92 inflateTest(R.layout.layout_five); in testLayout5()
97 inflateTest(R.layout.layout_six); in testLayout6()
102 inflateCachedTest(R.layout.layout_one); in testCachedLayout1()
107 inflateCachedTest(R.layout.layout_two); in testCachedLayout2()
112 inflateCachedTest(R.layout.layout_three); in testCachedLayout3()
117 inflateCachedTest(R.layout.layout_four); in testCachedLayout4()
[all …]
/frameworks/base/docs/html/training/improving-layouts/
Dreusing-layouts.jd7 previous.link=optimizing-layout.html
29 href="{@docRoot}guide/topics/resources/layout-resource.html#include-element">Layout
39 you might also need to re-use larger components that require a special layout. To efficiently
41 to embed another layout inside the current layout.</p>
46 extracted, managed separately, then included in each layout. So while
48 do it even more easily by re-using a layout file.</p>
53 <p>If you already know the layout that you want to re-use, create a new XML file and define the
54 layout. For example, here's a layout from the G-Kenya codelab that defines a title bar to be
70 layout to which you add this layout.</p>
75 <p>Inside the layout to which you want to add the re-usable component, add the {@code
[all …]
/frameworks/base/tests/BiDiTests/src/com/android/bidi/
DBiDiTestGridLayoutCodeRtl.java52 currentView = (FrameLayout) inflater.inflate(R.layout.grid_layout_code, container, false); in onCreateView()
63 GridLayout layout = new GridLayout(context); in create() local
64 layout.setUseDefaultMargins(true); in create()
65 layout.setAlignmentMode(ALIGN_BOUNDS); in create()
66 layout.setRowOrderPreserved(false); in create()
67 layout.setLayoutDirection(View.LAYOUT_DIRECTION_RTL); in create()
89 layout.addView(c, new GridLayout.LayoutParams(row1, col1a)); in create()
95 layout.addView(c, new GridLayout.LayoutParams(row2, col1b)); in create()
100 layout.addView(c, new GridLayout.LayoutParams(row3, col1c)); in create()
106 layout.addView(c, new GridLayout.LayoutParams(row3, col2)); in create()
[all …]
DBiDiTestGridLayoutCodeLtr.java52 currentView = (FrameLayout) inflater.inflate(R.layout.grid_layout_code, container, false); in onCreateView()
63 GridLayout layout = new GridLayout(context); in create() local
64 layout.setUseDefaultMargins(true); in create()
65 layout.setAlignmentMode(ALIGN_BOUNDS); in create()
66 layout.setRowOrderPreserved(false); in create()
67 layout.setLayoutDirection(View.LAYOUT_DIRECTION_LTR); in create()
89 layout.addView(c, new GridLayout.LayoutParams(row1, col1a)); in create()
95 layout.addView(c, new GridLayout.LayoutParams(row2, col1b)); in create()
100 layout.addView(c, new GridLayout.LayoutParams(row3, col1c)); in create()
106 layout.addView(c, new GridLayout.LayoutParams(row3, col2)); in create()
[all …]
/frameworks/base/docs/html-intl/intl/ja/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
64 <img src="{@docRoot}images/training/layout-hvga.png" />
126 <li><code>res/layout/main.xml</code>、シングルペイン(デフォルト)レイアウト:
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
130 <li><code>res/layout-large/main.xml</code>、2 ペイン レイアウト:
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
146 <li><code>res/layout/main.xml</code>、シングルペイン(デフォルト)レイアウト:
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
150 <li><code>res/layout-sw600dp/main.xml</code>、2 ペイン レイアウト:
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
[all …]
/frameworks/base/docs/html-intl/intl/zh-cn/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
64 <img src="{@docRoot}images/training/layout-hvga.png" />
126 <li><code>res/layout/main.xml</code>,单面板(默认)布局:
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
130 <li><code>res/layout-large/main.xml</code>,双面板布局:
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
146 <li><code>res/layout/main.xml</code>,单面板(默认)布局:
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
150 <li><code>res/layout-sw600dp/main.xml</code>,双面板布局:
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
[all …]
/frameworks/base/docs/html-intl/intl/ko/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
64 <img src="{@docRoot}images/training/layout-hvga.png" />
126 <li><code>res/layout/main.xml</code>, 단일 창(기본값) 레이아웃:
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
130 <li><code>res/layout-large/main.xml</code>, 이중 창 레이아웃:
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
146 <li><code>res/layout/main.xml</code>, 단일 창(기본값) 레이아웃:
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
150 <li><code>res/layout-sw600dp/main.xml</code>, 이중 창 레이아웃:
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
[all …]
/frameworks/base/docs/html-intl/intl/ru/training/multiscreen/
Dscreensizes.jd58 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane_with_bar.xml all}
64 <img src="{@docRoot}images/training/layout-hvga.png" />
126 <li><code>res/layout/main.xml</code>, однопанельный макет (по умолчанию):
128 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
130 <li><code>res/layout-large/main.xml</code>, двухпанельный макет:
132 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
146 <li><code>res/layout/main.xml</code>, однопанельный макет (по умолчанию):
148 {@sample development/samples/training/multiscreen/newsreader/res/layout/onepane.xml all}
150 <li><code>res/layout-sw600dp/main.xml</code>, двухпанельный макет:
152 {@sample development/samples/training/multiscreen/newsreader/res/layout/twopanes.xml all}
[all …]
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/
DLayoutInflaterFactoryTestCase.java58 assertThemedContext(inflater.inflate(R.layout.layout_android_theme, null)); in testAndroidThemeInflation()
70 assertThemedContext(inflater.inflate(R.layout.layout_app_theme, null)); in testAppThemeInflation()
87 R.layout.layout_android_theme_children, null); in testAndroidThemeWithChildrenInflation()
102 testAppCompatWidgetInflation(R.layout.layout_spinner, AppCompatSpinner.class); in testSpinnerInflation()
108 testAppCompatWidgetInflation(R.layout.layout_edittext, AppCompatEditText.class); in testEditTextInflation()
114 testAppCompatWidgetInflation(R.layout.layout_button, AppCompatButton.class); in testButtonInflation()
120 testAppCompatWidgetInflation(R.layout.layout_radiobutton, AppCompatRadioButton.class); in testRadioButtonInflation()
126 testAppCompatWidgetInflation(R.layout.layout_radiobutton_vector, in testRadioButtonInflationWithVectorButton()
133 testAppCompatWidgetInflation(R.layout.layout_checkbox, AppCompatCheckBox.class); in testCheckBoxInflation()
139 testAppCompatWidgetInflation(R.layout.layout_actv, AppCompatAutoCompleteTextView.class); in testActvInflation()
[all …]

12345678910>>...68