안드로이드 파급 효과를 사용하여이
사용자 정의 색상을 시도해보십시오
이 그릴 수-V21 폴더에 button.xml 만들기 당김 폴더
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/colorPrimaryDark"/>
<item android:drawable="@color/colorPrimary"/>
</selector>
을에 button.xml 만들기
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:colorControlHighlight">
<item android:drawable="@color/colorPrimary" />
</ripple>
y에 적용됩니다. 우리의 테마
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorControlHighlight">@color/colorPrimaryDark</item>
</style>
이제보기의 배경으로 button.xml을 설정할 수 있습니다. 어떤 쿼리 매력 같은 follow this link
작품의 경우
! 위대한 튜토리얼 링크도. 덕분에 – user3576118
대단히 감사합니다 내 ans을 표시하시기 바랍니다 –