The xml would go like this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ... <LinearLayout android:id="@+id/headerLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:background="@drawable/headerImage" android:orientation="vertical" /> <View android:layout_width="fill_parent" android:layout_height="5dip" android:background="@drawable/drop_shadow" > </View> </LinearLayout> ... | cs |
drop_shadow.xml :
1 2 3 4 5 6 7 8 9 | <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#404040" android:endColor="#F1F1F1" android:angle="270" > </gradient> </shape> | cs |
https://stackoverflow.com/questions/14463747/simple-layout-shadow-in-android
https://stackoverflow.com/questions/14463747/simple-layout-shadow-in-android
https://stackoverflow.com/questions/14463747/simple-layout-shadow-in-android
'android' 카테고리의 다른 글
[Android] Type parameter T Has Incompatible upper bounds ViewDataBinding 대처 (0) | 2019.01.29 |
---|---|
[Android] 테두리 양쪽 좌우만 설정하기 (1) | 2019.01.25 |
[Android] Design editor is unavailable until a successful build 에러 대처 (0) | 2019.01.25 |
[Android] @drawable resource 연결 후 failed linking file resources 대처 (0) | 2019.01.25 |
[Android] Android studio 3.x 이상 @android.support.annotation.Nullable 대응 (0) | 2019.01.21 |