티스토리 뷰
[Android Studio] 버튼 및 레이아웃 그림자 효과 주기 Shadow Effect
1. shadow.xml 생성
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Drop Shadow Stack -->
<item> <shape> <padding android:top="0dp" android:right="1dp" android:bottom="2dp" android:left="0dp" /> <corners android:radius="5dp" /> <solid android:color="#00CCCCCC" /> </shape> </item>
<item> <shape> <padding android:top="0dp" android:right="1dp" android:bottom="2dp" android:left= "0dp" /> <corners android:radius="5dp" /> <solid android:color="#10CCCCCC" /> </shape> </item>
<item> <shape> <padding android:top="0dp" android:right="1dp" android:bottom="2dp" android:left="0dp" /> <corners android:radius="5dp" /> <solid android:color="#20CCCCCC" /> </shape> </item>
<item> <shape> <padding android:top="0dp" android:right="1dp" android:bottom="2dp" android:left="0dp" /> <corners android:radius="5dp" /> <solid android:color="#30CCCCCC" /> </shape> </item>
<item> <shape> <padding android:top="0dp" android:right="1dp" android:bottom="2dp" android:left="0dp" /> <corners android:radius="5dp" /> <solid android:color="#50CCCCCC" /> </shape> </item>
<!-- Background -->
<item> <shape> <solid android:color="#ffffff" /> <corners android:radius="0dp" /> </shape> </item>
</layer-list>
2. activity_main.xml 코드 추가
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="10dp"
android:background="@drawable/shadow">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="그림자"
android:gravity="center"/>
</LinearLayout>
'안드로이드 > XML' 카테고리의 다른 글
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- react.js useEffect
- 안드로이드 해시키
- room error
- 깃허브 잔디 옮기기
- 깃허브에서 깃랩으로
- 안드로이드 스튜디오
- gitlab mirror
- 깃랩 잔디 옮기기
- react native oss
- 안드로이드 스튜디오 해시키
- Android Studio
- react native 오픈소스 라이선스
- next.js useEffect
- kotlin
- amplify next.js
- github mirror
- kakao api notworking
- 커밋 이메일 변경
- rn 오픈소스 라이센스
- rn oss
- next useEffect
- 라이브러리 라이센스
- 카카오 해시키
- 깃랩에서 깃허브로
- next.js ssr deploy
- non-zero exit code detected
- Build failed because of webpack errors
- 코틀린
- nextjs ssr deploy
- amplify build error
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함