I need to set Selector dynamically
我把帮助从这个How to set an image as a Background to a Button using StateListDrawable (dynamically or programmatically or through code)冻结申请
当我尝试设置默认的图像它不工作
state.addState(new int[] { },selectedthumb);
请帮我
我已尝试
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);
你有什么selectedthumb? –
@ChiragSavsani可绘制 – isha