Standard Android buttons (Button) have the effect of height (the edges of the buttons create it). How can this effect be achieved for LinearLayout. What would he look taller.

  • As an option, use the CardView library, which you can put your components on, and set its height to elevation - Werder

3 answers 3

Creating the effect of layers appeared in Material design, here are links to examples:

Android elevation

additional link

    As already said, it is possible to programmatically give height only with API level 21, by:

    android:elevation 

    In earlier versions, the effect of height can be given, as an option, using 9-patch images as the background view.

    9-patch

    The more intense and more shadow, the more visually it will seem that the element is elevated above the rest of the components of the markup.

       android:layout_height 

      Sets height for lyaout

      • you confuse the layout height a little with the effect of raising the view over the other views (along the z axis) - s_klepcha