About 359,000 results
Open links in new tab
  1. Create a linear layout | Views | Android Developers

    Jun 27, 2024 · LinearLayout is a view group that aligns all children in a single direction, vertically or horizontally. You can specify the layout direction with the android:orientation attribute. Note: For better performance and tooling support, build your layout with ConstraintLayout.

  2. android - How to align elements horizontally within a LinearLayout ...

    May 25, 2014 · If you do that, make the outer LinearLayout layout_width="fill_parent" and the inner buttons layout_width="0dp", you should be good. If that gets you stuck, I'd like to see that code and will be happy to help further.

  3. How to right align widget in horizontal linear layout Android?

    Try to change the layout_width to android:layout_width="match_parent" because gravity:"right" aligns the text inside the layout_width, and if you choose wrap content it does not have where to go, but if you choose match parent it can go to the right.

  4. LinearLayout and its Important Attributes with Examples in Android

    Jan 28, 2025 · LinearLayout is one of the most basic layouts in android studio, that arranges multiple sub-views (UI elements) sequentially in a single direction i.e. horizontal or vertical manner by specifying the android:orientation attribute.

  5. Linear Layout Tutorial With Examples In Android

    Jan 26, 2018 · Linear layout is a simple layout used in android for layout designing. In the Linear layout all the elements are displayed in linear fashion means all the childs/elements of a linear layout are displayed according to its orientation. The value for orientation property can be either horizontal or vertical.

  6. Linear Layout | Android Developers

    To create a linear layout in which each child uses the same amount of space on the screen, set the android:layout_height of each view to "0dp" (for a vertical layout) or the android:layout_width of each view to "0dp" (for a horizontal layout).

  7. Understanding the behavior of Android Linear Layout and its

    Just after creating a linear layout you will need to specify android: orientation attribute in your XML layout file. If you create a horizontal layout, child views will be aligned...

  8. layouts in android studio with examples - CodeWithRish

    Jan 10, 2022 · LinearLayout is used when we want to place different elements (eg. Button, RadioButton etc) in linear fasion that could be verticle (top to bottom) or horizontal (left to right). Code Snippet for Verticle LinearLayout. android:layout_width="match_parent" . android:layout_height="match_parent" . android:orientation="vertical"> . ...

  9. LinearLayout in Android App Development - Android DevHub

    Nov 10, 2024 · LinearLayout is a view group that arranges its child views in a single direction, either vertically or horizontally. You can set the orientation to vertical for a column-like structure or horizontal for a row-like structure.

  10. Linear Layout in Android - Studytonight

    In a horizontal LinearLayout, as the name suggests, the Views defined inside the Linear Layout will be arranged horizontally one after another, like in a row. By default, the orientation is set to horizontal.

  11. Some results have been removed
Refresh