My EditText in xml wrapped in LinearLayout:
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="TYPE HERE"
android:padding="7dp"
android:singleLine="true"
android:cursorVisible="true"
android:textIsSelectable="true"
/>
And in my fragment:
mEditText.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
mEditText.requestFocus();
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mEditText, InputMethodManager.SHOW_IMPLICIT);
return true;
}
Copy and paste feature doesn't work on the edit text ?? When I comment onTouchListener it works !
acbacbeaoclacm m cl adc a dcl arc ac a c amid ncoeocnejnlwencnajlendjlcejbcbaclbaldcblabdlbclabdclbladbclaelbclabdbcalebecam emac cjaecljabecbaebcjbec