In the default activity created by Android Studio, I added android:textIsSelectable="true"
. Now, if I long-press a word, it shows copy/share/select all, but when I tap elsewhere, it does not get closed. I need to either click the back button or select one item on the menu. How can I make the menu closed when I tap somewhere else?
There was the (probably) same question (although the questioner did not specify that it was a TextView, I think it was), but the only answer was assuming an EditText and talk about dismissing the software keyboard (which is not needed for TextView) and solving the problem by adding a listener to all views other than EditText. Seems kind of a dirty way. Is that the only way?