I want to get EditText selection start when user click in EditText (touch).
I do with this code :
int startIndex = txtMean.getSelectionStart();
this always return 0;
and EditText xml code:
<EditText android:id="@+id/txtMean" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" android:clickable="true" android:focusable="true" android:focusableInTouchMode="true" android:hint="" android:inputType="textMultiLine" android:scrollbars="none" />
my code work in android 2.* but don't work in 4.*