Note that there are some explanatory texts on larger screens.

plurals
  1. POviewpager not displaying child viewpager
    primarykey
    data
    text
    <p>in my class I'm calling another class to diplay fragment in dialog</p> <pre><code> public class FragmentT extends Fragment implements AnimationListener { ImageButton btn; Context cxt; RelativeLayout fragmentT; View vPOp; Animation animation; ViewPager pager; @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub if (container == null) { return null; } cxt=getActivity(); this.activity=getActivity(); vPOp = inflater.inflate(R.layout.pop, container, false); pager = (ViewPager) vPOp.findViewById(R.id.up); btn = (ImageButton) vPop.findViewById(R.id.button); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub new DialogFragmentWindow().show(getSupportFragmentManager(),""); } }); return vPop; } @Override public void onAnimationEnd(Animation arg0) { // TODO Auto-generated method stub } @Override public void onAnimationRepeat(Animation arg0) { // TODO Auto-generated method stub } @Override public void onAnimationStart(Animation arg0) { // TODO Auto-generated method stub } } </code></pre> <p>where DialogFragmentWindow is </p> <pre><code>public class DialogFragmentWindow extends DialogFragment { PageAdapter pPageAdapter; Context context; ViewPager vp; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.pop, container); context = getActivity(); // this.activity=getActivity(); vp = (ViewPager) view.findViewById(R.id.pVF); List&lt;Fragment&gt; fragments = getFragments(); FragmentAdapter pA = new FragmentAdapter(getChildFragmentManager(),fragments); vp.setAdapter(pA); getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); return view; } private List getFragments() { List&lt;Fragment&gt; fragmentPop = new Vector&lt;Fragment&gt;(); //fragmentPop.add(FragSc1.newInstance()); fragmentPop.add(Fragment.instantiate(context, FragSc1.class.getName())); fragmentPop.add(Fragment.instantiate(context, FragSc2.class.getName())); return fragmentPop; } } </code></pre> <p>so the problem is,neither do DialogFragmentWindow is accepting the argument getChildFragmentManager(),nor do the FragmentT class is taking, </p> <pre><code>new DialogFragmentWindow().show(getSupportFragmentManager(), ""); </code></pre> <p>the viewpager i'm calling is in another layout so want to use getChildFragmentManager(),not able understand thwe prob,using chid fragment/viewpager for the first time.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload