S
S
StynuBlizz2017-10-05 11:00:09
Android
StynuBlizz, 2017-10-05 11:00:09

How to make a view shadow in android api less than 21?

How to make the shadow of an element in api less than 21? It is necessary that the shadow was in a circle, something like this.59d5e788853f6406322057.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Myvrenik, 2017-10-05
@StynuBlizz

If you need exactly as in the picture, then use CardView , there are support attributes that you need.

<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:cardCornerRadius="10dp"
    app:cardElevation="10dp">

    <!-- Views -->
</android.support.v7.widget.CardView>

app:cardCornerRadius="10dp"- corner radius
app:cardElevation="10dp"- card height, shadow depends on it
Don't forget to add 'com.android.support:cardview-v7:26.1.0'dependencies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question