Home
last modified time | relevance | path

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

12345678910>>...22

/frameworks/base/core/java/android/text/
DSelection.java121 public static boolean moveUp(Spannable text, Layout layout) { in moveUp() argument
137 int line = layout.getLineForOffset(end); in moveUp()
142 if (layout.getParagraphDirection(line) == in moveUp()
143 layout.getParagraphDirection(line - 1)) { in moveUp()
144 float h = layout.getPrimaryHorizontal(end); in moveUp()
145 move = layout.getOffsetForHorizontal(line - 1, h); in moveUp()
147 move = layout.getLineStart(line - 1); in moveUp()
162 public static boolean moveDown(Spannable text, Layout layout) { in moveDown() argument
178 int line = layout.getLineForOffset(end); in moveDown()
180 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/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 …]
DTouch.java37 public static void scrollTo(TextView widget, Layout layout, int x, int y) { in scrollTo() argument
39 final int top = layout.getLineForVertical(y); in scrollTo()
40 final int bottom = layout.getLineForVertical(y + widget.getHeight() - verticalPadding); in scrollTo()
44 Alignment a = layout.getParagraphAlignment(top); in scrollTo()
45 boolean ltr = layout.getParagraphDirection(top) > 0; in scrollTo()
48 left = (int) Math.min(left, layout.getLineLeft(i)); in scrollTo()
49 right = (int) Math.max(right, layout.getLineRight(i)); in scrollTo()
146 Layout layout = widget.getLayout(); in onTouchEvent() local
148 ny = Math.min(ny, layout.getHeight() - (widget.getHeight() - padding)); in onTouchEvent()
154 scrollTo(widget, layout, nx, ny); in onTouchEvent()
DScrollingMovementMethod.java95 Layout layout = widget.getLayout(); in onTakeFocus() local
97 if (layout != null && (dir & View.FOCUS_FORWARD) != 0) { in onTakeFocus()
99 layout.getLineTop(0)); in onTakeFocus()
101 if (layout != null && (dir & View.FOCUS_BACKWARD) != 0) { in onTakeFocus()
104 int line = layout.getLineCount() - 1; in onTakeFocus()
107 layout.getLineTop(line+1) - in onTakeFocus()
/frameworks/base/docs/html/resources/articles/
Dlayout-tricks-reuse.jd18 <p>In Android XML layout files, each tag is mapped to an actual class instance
26 href="{@docRoot}resources/articles/layout-tricks-merge.html">Merging Layouts</a>
30 suggests; it includes another XML layout. Using this tag is straightforward as
43 &lt;include android:id="&#64;+id/cell1" layout="@layout/workspace_screen" /&gt;
44 &lt;include android:id="&#64;+id/cell2" layout="@layout/workspace_screen" /&gt;
45 &lt;include android:id="&#64;+id/cell3" layout="@layout/workspace_screen" /&gt;
49 <p>In the <code>&lt;include /&gt;</code> only the <code>layout</code> attribute
51 is a reference to the layout file you wish to include. In this example, the same
52 layout is included three times in a row. This tag also lets you override a few
53 attributes of the included layout. The above example shows that you can use
[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 …]
DViewFlipperActivity.java36 final View widget = inflater.inflate(R.layout.widget, null); in onCreate()
41 View view = inflater.inflate(R.layout.flipper_item, flipper, false); in onCreate()
47 view = inflater.inflate(R.layout.flipper_item, flipper, false); in onCreate()
53 FrameLayout layout = new FrameLayout(this); in onCreate() local
54 layout.addView(widget); in onCreate()
56 setContentView(layout); in onCreate()
DNinePatchesActivity.java31 FrameLayout layout = new FrameLayout(this); in onCreate() local
36 layout.addView(b); in onCreate()
37 layout.setBackgroundColor(0xffffffff); in onCreate()
39 setContentView(layout); in onCreate()
DSmallCircleActivity.java34 final LinearLayout layout = new LinearLayout(this); in onCreate() local
35 layout.setOrientation(LinearLayout.VERTICAL); in onCreate()
38 layout.addView(view, new LinearLayout.LayoutParams(PathView.SIZE, PathView.SIZE)); in onCreate()
41 layout.addView(view, new LinearLayout.LayoutParams(PathView.SIZE, PathView.SIZE)); in onCreate()
43 setContentView(layout); in onCreate()
DMaxBitmapSizeActivity.java33 final LinearLayout layout = new LinearLayout(this); in onCreate() local
36 layout.addView(view, new LinearLayout.LayoutParams(200, 200)); in onCreate()
40 layout.addView(view, new LinearLayout.LayoutParams(200, 200)); in onCreate()
42 setContentView(layout); in onCreate()
/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 …]
DMutateDrawable.java30 LinearLayout layout = new LinearLayout(this); in onCreate() local
42 layout.addView(ok); in onCreate()
43 layout.addView(cancel); in onCreate()
47 setContentView(layout); in onCreate()
/frameworks/support/v4/java/android/support/v4/widget/
DResourceCursorAdapter.java53 public ResourceCursorAdapter(Context context, int layout, Cursor c) { in ResourceCursorAdapter() argument
55 mLayout = mDropDownLayout = layout; in ResourceCursorAdapter()
75 public ResourceCursorAdapter(Context context, int layout, Cursor c, boolean autoRequery) { in ResourceCursorAdapter() argument
77 mLayout = mDropDownLayout = layout; in ResourceCursorAdapter()
92 public ResourceCursorAdapter(Context context, int layout, Cursor c, int flags) { in ResourceCursorAdapter() argument
94 mLayout = mDropDownLayout = layout; in ResourceCursorAdapter()
119 public void setViewResource(int layout) { in setViewResource() argument
120 mLayout = layout; in setViewResource()
/frameworks/base/core/java/android/widget/
DResourceCursorAdapter.java51 public ResourceCursorAdapter(Context context, int layout, Cursor c) { in ResourceCursorAdapter() argument
53 mLayout = mDropDownLayout = layout; in ResourceCursorAdapter()
73 public ResourceCursorAdapter(Context context, int layout, Cursor c, boolean autoRequery) { in ResourceCursorAdapter() argument
75 mLayout = mDropDownLayout = layout; in ResourceCursorAdapter()
90 public ResourceCursorAdapter(Context context, int layout, Cursor c, int flags) { in ResourceCursorAdapter() argument
92 mLayout = mDropDownLayout = layout; in ResourceCursorAdapter()
117 public void setViewResource(int layout) { in setViewResource() argument
118 mLayout = layout; in setViewResource()
/frameworks/base/tests/ImfTest/src/com/android/imftest/samples/
DEditTextActivityDialog.java89 View layout; in createDialog() local
93 layout = new ScrollView(EditTextActivityDialog.this); in createDialog()
94 ((ScrollView) layout).setMinimumHeight(mLayout.getHeight()); in createDialog()
96 ((ScrollView) layout).addView(( in createDialog()
98 R.layout.dialog_edit_text_no_scroll, null)); in createDialog()
100 layout = View.inflate(EditTextActivityDialog.this, in createDialog()
101 R.layout.dialog_edit_text_no_scroll, null); in createDialog()
107 d.setContentView(layout); in createDialog()
DOneEditTextActivityNotSelected.java48 LinearLayout layout = new LinearLayout(this); in onCreate() local
49 layout.setOrientation(LinearLayout.VERTICAL); in onCreate()
58 layout.addView(button); in onCreate()
59 layout.addView(editText); in onCreate()
61 ((ScrollView) mRootView).addView(layout); in onCreate()
DButtonActivity.java68 LinearLayout layout = new LinearLayout(this); in onCreate() local
69 layout.setOrientation(LinearLayout.VERTICAL); in onCreate()
70 layout.addView(myButton); in onCreate()
71 setContentView(layout); in onCreate()
72 mRootView = layout; in onCreate()
DManyEditTextActivityScrollResize.java42 LinearLayout layout = new LinearLayout(this); in onCreate() local
43 layout.setOrientation(LinearLayout.VERTICAL); in onCreate()
50 layout.addView(editText); in onCreate()
53 ((ScrollView) mRootView).addView(layout); in onCreate()
DDialogActivity.java96 LinearLayout layout; in createDialog() local
97 layout = new LinearLayout(this); in createDialog()
98 layout.setOrientation(LinearLayout.VERTICAL); in createDialog()
104 layout.addView(editText); in createDialog()
110 d.setContentView(layout); in createDialog()
/frameworks/base/docs/html/guide/developing/tools/
Dadt.jd72 edit Android-specific XML files in a form-based UI. A graphical layout editor lets you design
148 <p class="note"><strong>Note:</strong> You can edit Android-specific XML files (such as a layout
161 <dd>Edit and design your XML layout files with a drag and drop interface. The layout editor
164 <code>res/layout</code>. For more information, see <a href="#graphical-editor">Graphical Layout
193 as strings or layout files. You can access these enhancements by holding down the control key and
212 <li>Any file-based declaration, such as <code>@layout/bar</code>, opens the file.</li>
233 Many of these features are in the graphical layout editor, which you can access by opening one of
234 your application's XML layout files in Eclipse.
237 <p>The graphical layout editor is the main screen that you use to visually design and build your
244 layout and supports dragging and dropping of UI widgets
[all …]
Dlayoutopt.jd7 layouts and layout hierarchies of your applications.<p>
16 <p>To run <code>layoutopt</code> against a given list of layout resources:</p>
22 <pre>$ layoutopt res/layout-land</pre>
23 <pre>$ layoutopt res/layout/main.xml res/layout-land/main.xml</pre>
/frameworks/base/docs/html/guide/topics/resources/
Dlayout-resource.jd10 <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a></li>
15 <p>A layout resource defines the architecture for the UI in an Activity or a component of a UI.</p>
21 <dd><code>res/layout/<em>filename</em>.xml</code><br/>
29 In Java: <code>R.layout.<em>filename</em></code><br/>
30 In XML: <code>@[<em>package</em>:]layout/<em>filename</em></code>
52 &lt;<a href="#include-element">include</a> layout="@layout/<i>layout_resource</i>"/&gt;
69 specify the layout of the child elements in different ways. Different kinds of
131 href="{@docRoot}guide/topics/ui/declaring-layout.html">XML Layouts</a> for more information. For
142 <dd>Includes a layout file into this layout.
145 <dt><code>layout</code></dt>
[all …]
/frameworks/base/docs/html/guide/topics/ui/notifiers/
Dtoasts.jd12 <li>You can customize the toast layout to include images</li>
67 toast differently or even use your own layout instead of a simple text message.
95 <p>If a simple text message isn't enough, you can create a customized layout for your
96 toast notification. To create a custom layout, define a View layout,
100 <p>For example, you can create the layout for the toast visible in the screenshot to the right
125 ID to inflate the layout from the XML, as shown here:</p>
129 View layout = inflater.inflate(R.layout.toast_layout,
132 ImageView image = (ImageView) layout.findViewById(R.id.image);
134 TextView text = (TextView) layout.findViewById(R.id.text);
140 toast.setView(layout);
[all …]

12345678910>>...22