i have button , text-view, text-view has drawable-left. after click on button drawable-left should removed , plain text should set text-view, don’t know how remove drawable-left code.
thanks in advance.
the drawableleft
(or of similar attributes) xml attribute can modified (removing drawable
in case) via code using this:
yourtextview.setcompounddrawableswithintrinsicbounds(0, 0, 0, 0); yourtextview.settext("the text need in there");
the constructor method in order:
setcompounddrawableswithintrinsicbounds (int left, int top, int right, int bottom)
read more method setcompounddrawableswithintrinsicbounds here
Comments
Post a Comment