Issue
How getCompoundDrawables()
is used in Android:
if(mEditText.getCompoundDrawables()[2] == null)
mEditText.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_face, 0);
I wanted to check whether there is a drawable in EditText
at the end of it. Is the if condition giving the correct result?
Solution
Yes this is the correct way to find out whether a compound drawable is set or not.
Answered By - Jiju Induchoodan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.