我想创建一个选择器,用#000000表示选中的状态,用#FFFFFF表示未选中的状态。StateListDrawable states = new StateListDrawable();ColorDrawable cdUnPress = new ColorDrawable(0x0101DF);
state
是否可以将在XML中创建的选择器扩展为供StateListDrawable以编程方式使用?StateListDrawable states = new StateListDrawable();
states.addState(new int[] {android.R.attr.state_pressed}, getResources().g