解决方法: 将三个<item>标签调换顺序,换为: <?xml version="1.0" encoding="utf-8"?><itemandroid:drawable="@color/dark_gray"android:state_pressed="true"/><itemandroid:drawable="@color/lawn_green"android:state_enabled="false"/><itemandroid:drawable="@color/purple_200"/> 问题解决! 感想:离谱!
其中state_focused 和 state_pressed 可自由有如下4种组合 android:state_focused="true" android:state_pressed="true" android:state_focused="true" android:state_pressed="false" android:state_focused="false" android:state_pressed="true" android:state_focused="false" android:state_pressed="false" 可以...
[Android.Runtime.Register("isButtonPressed", "(I)Z", "")] public bool IsButtonPressed (Android.Views.MotionEventButtonState button); 參數 button MotionEventButtonState 按鈕(或按鈕的組合)。 傳回 Boolean 如果按下指定的按鈕,則為 True。 屬性 RegisterAttribute 備註 檢查是否按下滑鼠或手寫筆按鈕...
[Android.Runtime.Register("isButtonPressed", "(I)Z", "")] public bool IsButtonPressed (Android.Views.MotionEventButtonState button); 參數 button MotionEventButtonState 按鈕(或按鈕的組合)。 傳回 Boolean 如果按下指定的按鈕,則為 True。 屬性 RegisterAttribute 備註 檢查是否按下滑鼠或手寫筆按鈕...