android - ImageButton selector doesn't work? -
I press the image button, trying to create a focused and normal state. I have read the introduction of the image button
I have saved the selector XML file in / res / drawable / I also set android: src = "@drawable / my_silcutor"
.
my_selector.xml file:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Selector xmlns: Android = "http://schemas.android.com/apk/res/android" & gt; & Lt; Item Android: Dragon = "@ Drable / Btn_onfocus" /> & Lt ;! - default - & gt; & Lt; Item android: state_pressed = "true" Android: drawable = "@ drawable / btn_onpress" /> & Lt ;! - pressed - & gt; & Lt; Item Android: state_focused = "true" android: drawable = "@ drawable / btn_onfocus" /> & Lt ;! - Centric - & gt; & Lt; / Selector & gt;
I think I have made the right image button.
Please give advice. "Itemprop =" text ">
Item tags should be ordered.
Comments
Post a Comment