我用下面的代码在EditText中放了一个可绘制的:
final Drawable x = getResources().getDrawable(R.drawable.del2);
x.setBounds(0, 0, x.getIntrinsicWidth(), x.getIntrinsicHeight());
atxt.setCompoundDrawables(null, null, x, null);当我想再放一个的时候,第一个抽屉就消失了!!我想把两个可抽屉,但显然这是不可能的!到底有没有呢?
发布于 2012-03-29 02:05:49
您正在寻找LayerDrawable。有关一些示例的更多信息,请单击此处:http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList
希望这会有帮助的。
https://stackoverflow.com/questions/9912345
复制相似问题