I would like to know your opinion on ways to solve the Android Up navigation problem that I am trying to solve. I have a MainActivity with RecycleView showing a scrollable list of items that are retrieved from the API. Each element has an onclick listener, which opens the element detail activity, for example:
Intent intent = new Intent(context, DetailActivity.class);
intent.putExtra("item", item);
context.startActivity(intent);
DetailActivity has an Up button where the user can return to the previous action. Here is the manifest for this activity:
<activity
android:name=".DetailActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.Base"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
And here's the problem: when I go to parent activity, the scroll list is reset and is at the top. If I use the back button on the device, the list is saved and the scroll position remains, but not when I press the up button ...
, -, , DetailActivity , , .
, ? Android , ...