Asked
Active
Viewed 704 times
-4
-
1Please refer to this: [here](http://stackoverflow.com/help/asking) – Srijan Karki Apr 29 '16 at 04:52
1 Answers
0
You can use a CardView
and set its elevation to create a shadow:
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="4dp">
<!-- Insert desired views here -->
</android.support.v7.widget.CardView>
Note that the CardView
extends FrameLayout
so it will stack its children if there are more than one. Add a LinearLayout
or RelativeLayout
inside the CardView
and add the views (EditText's in your case) inside one of those for more flexibility.

AgileNinja
- 914
- 1
- 7
- 20
-
When I am using the CardView Object. it say the following class could not be found - android.support.v7.widget.CardView – Aman Agarwal Apr 29 '16 at 06:15
-
@AmanAgarwal You need to add the design support library to your module's build.gradle, as such: `compile 'com.android.support:design:23.1.0'`. Instead of 23.1.0, use version you are using in your project. – AgileNinja Apr 29 '16 at 16:19