將這一段代碼添加到我的styles.xml文件中,將按鈕的主要顏色更改爲colorPrimary的綠色。更改按鈕帶紋波的背景顏色
<resources>
<!-- Base application theme. -->
<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>
</style>
<style name="AppTheme.Button" parent="Base.Widget.AppCompat.Button">
<item name="colorButtonNormal">@color/colorPrimary</item>
</style>
</resources>
然後我試圖與它的連鎖反應結合,因爲我在你需要創建一個XML ripple_effect文件,並使用它作爲背景的按鈕,另一疊後閱讀。然後將按鈕的樣式設置爲style.xml中詳細描述的自定義樣式。
我如何鏈接到按鈕編輯器
我在做什麼錯。是否有一種更簡單的方法來實現在按鈕和顏色上添加漣漪效果。我一直試圖解決這個堆棧溢出帖子,但每個解決方案似乎不同。我對API 23