I have an ImageButton, where the source image is loaded dynamically from the network. My goal is to set different color filters on the image according to the button’s state (i.e state_pressed, state_focused…). The problem is that I cant use Selector because my image is loaded dynamically and is not a drawable resource.
Does any one can give me a clue how can I recognize the state using code and imitate the selector’s work?
I have an ImageButton , where the source image is loaded dynamically from the
Share
You can set the states programmatically as outlined by kcoppock in this SO post