I need to set Selector dynamically
I took help from this How to set an image as a Background to a Button using StateListDrawable (dynamically or programmatically or through code)
When i try to set default image its not working
state.addState(new int[] { },selectedthumb);
Please help me
What i have tried
StateListDrawable state = new StateListDrawable();
state.addState(new int[] { android.R.attr.state_selected },
selectedthumb);
state.addState(new int[] { android.R.attr.state_focused }, thumb);
state.addState(new int[] { },thumb);