Is there a way I can find what resource a particular ImageButton is set to, at any given time?
For eg: I have an ImageButton that I set to R.drawable.btn_on
The documentation on android docs is incorrect. Here it states that pickDropPoint.getDrawableState()[android.R.attr.state_pressed] returns true or false, but instead it returns 1 or 0, an **int**.
I had to do the following to get it working
The drawable xml for pressed feel
In code, you dont need the for loop as suggested by @slup
whichPoint = (pickDropPoint.getDrawableState()[android.R.attr.state_pressed] > 1 ? PICKUP : DROP);