I am going through a problem .
XML Coding
<EditText
android:id="@+id/edt_txt_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="false"
android:onClick="editTextClick" >
</EditText>
Java Coding
public void editTextClick(View v) {
if (v.getId() == R.id.edt_txt_id){
System.out.println(" edit text click");
EditText edtxtx =(EditText)v;
edtxtx.requestFocus();
edtxtx.setText("");
}
}
I want that when i click on editText then current text must be dissapperar. But when i click with
android:focusable="false"
Click event work fine but cursor is no longer at Edit-text. It means if want to enter some new Text then how could enter this new text even cursor is not at Edit-text , and if i work with
android:focusable="true"
then click event does not work. But is available for any new edit .What is problem ? I know it is silly mistake , but where , i can't figure out.Thanks in advance to all.