I am using databinding with edittext. The issue i am facing is that, text is lost on orientation change. So i am setting the text on by saving it onSaveInstanceState. But then the focus of the text is shown at the beginning of the text. I verified that edittext has a unique id as that is the main reason where the text is lost.
<EditText
android:id="@+id/searchTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
android:imeOptions="actionDone|flagNoExtractUi"
android:inputType="textNoSuggestions|textEmailAddress"
android:text="@={searchText}"
android:textColor="?colorShade1"
android:textColorHint="?colorShade3"
android:textSize="28sp" >
<requestFocus/>
</EditText>