In my application,I have 4 ImageButtons and each ImageButton have different source image based on their states.So maintaining 4 separate xml files for each of the button.
Is there any way to write all the selectors in a single xml file ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not it’s not possible:
The documentation says:
A StateListDrawable is a drawable object defined in XML that uses a several different images to represent the same graphic, depending on the state of the object.
note here: same graphic
src: Drawable Resources