I have a EditText which I am presenting as disabled so that user cannot edit the contents and also to avoid popping-up keyboard. But now I want to capture onclick event in the EditText and identify the individual words that are being clicked. Any help is most welcome.
Thanks, Balkrishna.
You can make the component unclickable by using.
To make the component look visually disabled by decreasing the Alpha value.
It will allow you to set an OnTouchListener on your component by which you can perform your desired operations.
On your
EditText
set attributesandroid:focusable="false"
andandroid:enabled="true"
. And setOnClickListener
to thatEditText
. The click on that Edittext triggers theonClick()
method but it can't be edited. I just tried it.