http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/0924/1712.html
http://www.open-open.com/lib/view/open1455978476151.html
StateListDrawable drawable = new StateListDrawable();
drawable.addState(new int[]{android.R.attr.state_focused}, mFocusedDrawable);
drawable.addState(new int[]{android.R.attr.state_enabled, android.R.attr.state_pressed}, mEnabledPressedDrawable);
drawable.addState(new int[0], mDefaultDrawable);
0 条评论