Questions tagged [android-nested-fragment]

Nested android fragments represent fragments which are embedded in other fragments.

Nested fragments were introduced in the Android SDK starting with API level 4.2. They are also available on lower API versions through the support compatibility package.

By using getChildFragmentManager()(method of the Fragment class), a fragment can have the behavior of a FragmentActivity. The nested fragments workflow closely follows the one of a normal fragment(which is embedded at in an Activity). For more information about fragments, see the Google Documentaton.

When asking questions about nested fragments one should always add the tag, optionally the could also be added.

281 questions
0
votes
1 answer

nestedviewpager nested fragment error

I have a Viewpager contains Recylerview which has 2 different holders. One of them is also view pager. Hence I have nested viewpager nad nested fragments. When I tap the second tab and tap back the first tab it is fine .But when I tap the third tab…
0
votes
2 answers

Nested Child Fragment with Viewpager

Currently, I am trying to create a nested view pager using a fragment, how can I access top parent function to refresh the View? Let's say I have: public class ParentFragment extends Fragment { ...{ ... viewPagerAdapter = new…
0
votes
1 answer

Android: Updating a nested fragment from another fragment

I have two fragments, Fragment A and Fragment B. Fragment A contains 4 tabs as shown below: Tab 3 has recycler view, from which user will select an option. Now user will go to Fragment B, and does something. When he is done, the call will again be…
Nitish
  • 3,097
  • 13
  • 45
  • 80
0
votes
1 answer

Fragment's childfragmentmanager getFragments() return null after replace

I have MainActivity and has a FragmentLayout inside. I am showing different fragments inside that layout when tabs selected (like instagram) with this code. MABaseFragment fragment =…
0
votes
1 answer

Working with OptionsMenu in nested fragment not updating

I displayed a fragment A that implements a ViewPager with several fragments (nested fragments). In my nested fragments, I inflate a menu with the following method. @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { …
0
votes
2 answers

Fragment Layout Not Adding Up More Views

I'm trying to add a FrameLayout in my fragment layout, just to reserve space to add another fragment, programmatically. Here's code : FRAGMENT XML LAYOUT
0
votes
4 answers

Launching Fragment from activity

In my MainActivity, I have a viewPager containing two containers "A and B". Both containers are possessed with their own Fragments. In container B; I again have a viewPager containing multiple fragments.(For example one,two,three,four) On launch of…
0
votes
1 answer

Can I use getSupportFragmentManager() to create child fragments?

I read this: http://developer.android.com/about/versions/android-4.2.html#NestedFragments specifically I read, The Android Support Library also now supports nested fragments, so you can implement nested fragment designs on Android 1.6 and…
0
votes
1 answer

What exactly happens when Android recreates my app on an orientation change using nested fragments and getSupportFragmentManager()?

I've looked at other threads related to this issue and they all seem to use getChildFragmentManager() but if possible, I'd like to use getSupportFragmentManager(). Here is the issue: I have parent fragment A which holds child fragment B. B is a…
Lv99Zubat
  • 853
  • 2
  • 10
  • 27
0
votes
1 answer

How to show image from inside the nested fragments?

Although there are many questions about nested fragments but still it got me stumped in this case.I am making an android app which has an Activity having a frame layout.I am loading a fragment(say Fragment B) into the frame layout.Fragment B has a…
Rajat
  • 99
  • 1
  • 8
0
votes
4 answers

FragmentTabHost Setup Error

I'm trying to implement a nested fragment with the FragmentTabHost, however I keep getting an error with the setup() function. Code is below. This is My Class File public class ForumFragment extends Fragment{ private FragmentTabHost…
0
votes
0 answers

Error while starting an activity from a nested Fragment

I am trying to start a new activity from within a nested fragment using the following code : Intent rateIntent = new Intent(context, RateServiceActivity.class); getActivity().startActivity(rateIntent); I am getting the following error…
0
votes
1 answer

NestedFragment onActivityResult returns getActivity() Null

I am adding Nested fragment to activity and calling onActivityResult into nested fragment and in parent activity. I am able to get requestcode back from parent activity to nested fragment but after onActivityResult, getActivity() returns null but…
0
votes
0 answers

Nested fragments and interface

I have got "Main" fragment with two nested fragment. I setTargetFragmet for nested fragments trailMapFragment.setTargetFragment(SORestaurantsMapFragment.this, 0); And I am using this interface in nested fragments. @Override public…
Unmerciful
  • 1,325
  • 4
  • 21
  • 38
0
votes
0 answers

Nested fragment not getting removed completely

In my activity, I have various fragments. By default activity displays a map. On listitem click, Fragment A, B or C is displayed using following code: protected void replaceFragment(int i) { FragmentManager fragmentManager =…
GAMA
  • 5,958
  • 14
  • 79
  • 126