I have an issue. First of all I have a menu where when you select an option it creates a fragment that can be slid in and out.
When the activity is first created it populates my view with Frag#1. Frag#1 contains a PagerView, that contains a variable number of fragments. When Frag#1 is auto created from the activity being started, the PagerView is populated perfectly.
However if I then switch to any other Frag by calling .Replace, and then come back to Frag#1 calling .replace, the PagerView populates invisibly.
However Even though the fragments inside the PagerView are invisible I am able to swipe though them, and access the TextViews, Layouts, and ImageViews inside them. So they exist otherwise I would get null for the Views, or no such ID exists. But the fragments in the PagerView stay missing from sight.
When I reach the end of the PagerView, it populates the last one and I can see the fragment inside it. Now when I scroll back to the first one I can see it too now. However the one in the middle is still gone, but I can access the views in it.
Does anyone have an Idea what is going on here?
If instead of trying to replace the old fragment with Frag#1 I restart the activity it works fine again.
i.e.
public void reload() {
Intent intent = getIntent();
overridePendingTransition(0, 0);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
finish();
overridePendingTransition(0, 0);
startActivity(intent);
}