0

I don't know if this is possible but I am looking for a way to display a toast message after clicking on edittext.

I tried this but it didn't work:

 editText1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(RectangleWidth.this, "message here", Toast.LENGTH_SHORT).show(); return; } }); 
1

2 Answers 2

1

First you should set the edit text to android:focusable="false" in your xml code

Sign up to request clarification or add additional context in comments.

Comments

0

Maybe it's not the best solution from a UI point of view. See here: Android EditText onClickListener

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.