Android drawableLeft 属性设置状态选择器无效

解决办法:动态添加drawableleft

                Drawable left = mContext.getResources().getDrawable(R.drawable.left);
		Drawable right = mContext.getResources().getDrawable(R.drawable.right);
		left.setBounds(0, 0, left.getMinimumWidth() - 4, left.getMinimumHeight());
		right.setBounds(0, 0, left.getMinimumWidth() - 4, right.getMinimumHeight());
                text.setCompoundDrawables(left, null, right, null);
		

猜你喜欢

转载自blog.csdn.net/m0_37143081/article/details/81019804