About 12,300,000 results
Open links in new tab
  1. android - how to set padding or margin to linear layout

    May 28, 2012 · You need to learn how Android addresses the variations in screen densities so that your app is screen density independent. Start here: …

  2. android - How to add Margin/padding in LinearLayout programmatically ...

    Sep 6, 2018 · I am trying to set padding to my linear layouts so that when I press 'create row' they have a gap between them each. I tried adding marginTop and marginBottom to my …

  3. android: how do I add padding to a LinearLayout inside a FrameLayout

    Feb 6, 2014 · I have a FrameLayout with many children. One of the children is a LinearLayout. I want the width of the LinearLayout to match_parent but about 90% so; which means I want to …

  4. android - How to make space between LinearLayout children

    Mar 14, 2015 · You can integrate the padding into divider. In case you were using none, just create a tall empty drawable and set it as LinearLayout's divider: <LinearLayout …

  5. android - Add padding on view programmatically - Stack Overflow

    You can set padding to your view by pro grammatically throughout below code - view.setPadding(0,1,20,3); And, also there are different type of padding available -

  6. Create a linear layout | Views | Android Developers

    Jun 27, 2024 · 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 …

  7. Set Margins in an Android LinearLayout Programmatically

    This example demonstrate about How to set margins in an Android LinearLayout programmatically. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project …

  8. Padding in Android Layout - Studyopedia

    Here, we will learn what is padding and how it can be worked easily on Android layout. Demo app will be shown to make it easy for a Beginner to understand. Let’s start with the following …

  9. Set Margins in Android LinearLayout Using Kotlin

    This example demonstrates how to set margins in an Android LinearLayout programmatically using Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill …

  10. Concept of Padding in Android - GeeksforGeeks

    May 4, 2025 · How to use padding in Android XML? Basic syntax of padding attribute: android:padding="20dp" This line adds 20dp of space on all four sides—top, bottom, left, and …

  11. Some results have been removed