0

I want to implement a functionality that an edittext with clear button if it has more than one character.

I have 10 edittext in my app, So to implement the above functionality i have to use 10 clear images and 10 onTouchListeners to enable clear image if it has more than one character.

So can you please give me the best solution to implement the above scenario.

And is it possible by creating Custom EditText?

user1557549
  • 51
  • 2
  • 4
  • Only 1 listener will be sufficient for u i guess.. – NullPointerException Jan 24 '14 at 15:54
  • I cannot able to set the text for edittext? com.edittextex.ClearableEditText editText=(com.edittextex.ClearableEditText) findViewById(R.id.edit_text_clearable); editText.setText("Edti Text");//cannot find this method,because it extends RelativeLayout – user1557549 Jan 25 '14 at 12:54

0 Answers0