0

I want to get the end and start icon view from TextInputLayout so I can do stuff like check if it is hovered or not.

I don't know where to start (idk if this is possible), so any help will be greatly appreciated.

ToolDroid
  • 1
  • 2

1 Answers1

0

this.binding.inputLayout is the TextInputLayout:

// Get start icon
CheckableImageButton startIcon = this.binding.inputLayout.findViewById(com.google.android.material.R.id.text_input_start_icon);

// Get end icon
CheckableImageButton endIcon = this.binding.inputLayout.findViewById(com.google.android.material.R.id.text_input_end_icon);
Anton Menshov
  • 2,266
  • 14
  • 34
  • 55
ToolDroid
  • 1
  • 2