How to show shadow around the linearlayout in Android?

前端 未结 13 2356
名媛妹妹
名媛妹妹 2020-11-27 10:51

How can I show shadow for my linear layout. I want white colored rounded background with shadow around the linearlayout. I have done this so far.



        
相关标签:
13条回答
  • 2020-11-27 11:25

    i know this is way too late. but i had the same requirement. i solved like this

    <android.support.v7.widget.CardView
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:cardUseCompatPadding="true"
    app:cardElevation="4dp"
    app:cardCornerRadius="3dp" >
    
    <!-- put whatever you want -->
    
    </android.support.v7.widget.CardView>
    

    you need to add dependency:

    compile 'com.android.support:cardview-v7:25.0.1'
    
    0 讨论(0)
提交回复
热议问题