0

How can you add a simple edittext field to the detail fragment? (for the master/detail layout app). If I add one, I cannot type in it and the keyboard doesn't show. Are there further settings I need to do? I have not found a proper example.

This is all I did. Just wanted to check if it works.

<EditText
android:id="@+id/example"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/example"
android:inputType="text" />
Codemon
  • 269
  • 1
  • 4
  • 16

1 Answers1

0

Try with this, it worked for me.

EditText etHorseName = (EditText) getView().findViewById(R.id.horseName);
etHorseName.clearFocus();

in onCreate() or where you want

Hanuman
  • 958
  • 13
  • 35