I am working with Fragments.
See the image below.
can we hold different activity's(Activity A) fragment(Fragmet A1) inside a fragment(Fragment B2) of another activity(Activity B)?
Is it possible how can we do this ?
I am working with Fragments.
See the image below.
can we hold different activity's(Activity A) fragment(Fragmet A1) inside a fragment(Fragment B2) of another activity(Activity B)?
Is it possible how can we do this ?
public void addInnerFrag() {
getChildFragmentManager().beginTransaction().add(R.id.fragContainer, new InnerFrag()).commit();
getChildFragmentManager().executePendingTransactions();
}
yes it is possible we can place fragment inside another fragment.
the solution is while you adding the fragment you will use getFragmentManager()
.
while adding the child fragment inside the fragment you have to use getChildFragmentManager()
;
the following link may useful to you: here