For this task ...
0) Start a new activity
I read about the question again and realized that you need advice to get started. So, starting with a new activity, well, your main problem will be on the other side (see below).
But let's talk about the start of other data. Using Fragment instead does not solve your problem, fragments help when working with other screens. Using, for example, just updating data as an option. You can use only one activity and update only data, it will look much better if you also add animation, but no better than getting started.
Using a snippet helps you with various screen actions. And, perhaps, answering your question - this will be the most suitable solution . You use only one activity - PostActivity and several fragments - FragmentMainPost, FragmentRelated - which will be replaced by each other, choosing from the corresponding record.
1) Return problems
Suppose users click on a new action and upload new data. This is normal, and when users click more than 100 actions and get a lot of information. Good too. But the main question here is going back (also about caching, but let's leave it for now).
So everyone knows this is a bad idea to keep a lot of action on the stack. Therefore, for each of my applications with similar behavior, we override onBackPressed in this exercise. But how, let's see the stream below:
//Activities most have some unique ID for saving, for ex, post number. //Users clicks to 100 new activities, just start as new activity, and //finish previous, via method, or setting parameter for activity in AndroidManifest <activity noHistory=true> </activity> .... //When activity loaded, save it activity data, for ex, number of post //in some special place, for example to our Application. So as a result //we load new activity and save information about it to list .... // User now want return back. We don't save all stack this activities, // so all is Ok. When User pressing back, we start action for loading //activities, saved on our list.. ..... onBackPressed () { //Getting unique list LinkedTreeSet<PostID> postList = getMyApplication().getListOfHistory(); //Getting previous Post ID based on current PostID previousPostID = postList.get(getCurrentPost()); //Start new activity with parameter (just for ex) startActivity(new Intent().putExtra(previousPostID)); }
RESULT
I found this the best solution for these tasks. Because at every moment - we work with only one activity!