<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/colorAccentDark">
<item>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@color/button_accent_dark"
android:state_checked="false"/>
<item
android:drawable="@color/button_accent"
android:state_checked="true" />
<item
android:drawable="@color/button_accent_dark" />
</selector>
</item>
</ripple>
혹은
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight" >
<item
android:id="@android:id/mask"
android:drawable="@drawable/btn_rectangle"/>
<item android:drawable="@drawable/btn_rect_states"/>
</ripple>
'Android > Development Tips' 카테고리의 다른 글
안드로이드 디바이스 설정(언어설정, SIM 교체, 화면 돌림) 데이터 보존 (0) | 2018.12.12 |
---|---|
[Android] Sparse Array 와 HashMap 비교하기 (0) | 2018.11.08 |
[Android] Foreground 활용하기, 터치 이벤트 쉽게 적용하기 (0) | 2018.11.08 |
[펌] Activity 스택 intent flag (0) | 2018.07.12 |
Android NDK (0) | 2018.04.12 |