Onresume Called Multiple Times Inside Fragment March 08, 2024 Post a Comment I have InnerFragment containing RecyclerView, inside MainFragment which is added to ViewPager. When MainFragment gets created while swiping OnResume is called multiple times 1stSolution 1: when adding fragment, use replace() instead of add()beforegetChildFragmentManager().beginTransaction().add(R.id.framelayoutID, InnerFragment.newInstance()).commit(); CopyaftergetChildFragmentManager().beginTransaction().replace(R.id.framelayoutID, InnerFragment.newInstance()).commit(); Copy Share Post a Comment for "Onresume Called Multiple Times Inside Fragment"
Post a Comment for "Onresume Called Multiple Times Inside Fragment"