반응형
- Ripple touch effect was introduced with material design in Android 5.0 (API level 21) and the animation is implemented by the new RippleDrawable class.
- Ripple 터치 효과는 Android 5.0 (API Level 21 - 롤리팝)에서 Material Design과 함께 공개되었으며 RippleDrawable Class에 의해 애니메이션으로 동작합니다.
- Drawable that shows a ripple effect in response to state changes.
- 사용자에 의한 상태 변경에 대한 Ripple 터치 효과를 나타내는 Drawable 입니다.
📄 Ripple Drawable XML Source Code
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#88FFFFFF"> <!-- Ripple color :: WHITE (눌린 후 색상) -->
<item>
<!-- Normal bg color :: #164A7D (눌리기 전 색상) -->
<color android:color="#164A7D" />
</item>
<!-- Make sure the ripple doesn't exceed the bounds -->
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="?android:colorAccent" />
</shape>
</item>
</ripple>
🚀 REFERENCE
반응형
'#모바일 [Mobile] > Android' 카테고리의 다른 글
[Android] AsyncTask (0) | 2019.07.25 |
---|---|
[Android - OpenSource] Butter Knife (0) | 2019.07.25 |
[Android] Date Picker Dialog (0) | 2019.07.22 |
[Android] Android Studio Assets Folder 만들기 (0) | 2019.06.27 |
[Android] 브로드캐스트 리시버 (Broadcast Receiver) (0) | 2019.06.26 |
댓글