Nabeel
06/03/2021, 6:41 AM<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/name"
layout="@layout/form_element_layout" />
<include
android:id="@+id/unit"
layout="@layout/form_element_layout" />
<include
android:id="@+id/quantity"
layout="@layout/form_element_layout" />
</LinearLayout>
form_element_layout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/title"
style="@style/TextViewRegularHeading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title"
android:textSize="@dimen/title_text_size" />
<EditText
android:id="@+id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/edit_text_forms_bg"
android:hint="@string/form_hint"
android:inputType="text" />
</LinearLayout>
After entering values in name.input
, unit.input
and quantity.input
fields, I've navigated to fragment_two.
When returning from the fragment_two to fragment_one, the values in every field changed to the value of the quantity.input
Eg : name is John, unit is Kg and quantity is 80. After navigating to fragment_two and returned, the name, unit and quantity values are changed to 80, Any help?Jiddles
06/03/2021, 9:06 AMNabeel
06/03/2021, 9:09 AMJiddles
06/03/2021, 9:11 AM