API 21+平面按鈕在觸摸時產生波紋。這是在AppCompat中定義的?材料平面按鈕上定義的紋波位於何處
我可以發現在凸起按鈕上的波紋在drawable/v21/abc_btn_colored_material.xml
中定義。但唯一的平面按鈕繪製在底部drawables/abc_btn_borderless_material.xml
定義,它沒有波紋(顯然)。
那麼在平面按鈕上設置紋波的位置在哪裏?
我期待在程序兼容性-V7:23:4.0
編輯:
我也跟着亞歷山大米羅諾夫描述的路徑,但我btn_borderless_material樣子:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/abc_btn_default_mtrl_shape"/>
<item android:state_pressed="true" android:drawable="@drawable/abc_btn_default_mtrl_shape"/>
<item android:drawable="@android:color/transparent"/>
</selector>
您確定您使用相同的SDK作爲我?正如你所提到的appcompat-v7:23我假定你使用API 23.最後的路徑是我的系統上的'PATH_TO_ANDROID_SDK \ platforms \ android-23 \ data \ res \ drawable \ btn_borderless_material.xml',你可以檢查它是否與你的。 –