How could be possible to click on EditText\'s right drawable (check the screenshot)? I have tried several ways but I always get stuck.
public static Matcher
I solved it using the Material Component TextInputLayout and TextInputEditText
In your xml:
The trick here is to set the app:endIconMode="custom"
then add your drawable as u want.
In java class:
you can use the setEndIconOnClickListener
and do what you want as below:
tilLocation.setEndIconOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//do click
}
});