控制drawableLeft等的可见性

不能去掉红字部分,否则不显示drawable
mBottom = getResources().getDrawable(R.drawable.rcs_search_edittext);
mBottom.setBounds( 0, 0, mBottom.getMinimumWidth(),mBottom.getMinimumHeight());
mLeft = getResources().getDrawable(R.drawable.ic_actionbar_search_normal);
mLeft.setBounds( 0, 0, mLeft.getMinimumWidth(),mLeft.getMinimumHeight());

左可见:
mEditSearchText.setCompoundDrawables(mLeft,null,null,mBottom);
左不可见只需要设置null
mEditSearchText.setCompoundDrawables( null,null,null,mBottom);

你可能感兴趣的:(控制drawableLeft等的可见性)