0

I used the wizard to create an tabbed Activity which contains an FragmentPagerAdapter, in the getItem() function I returned my own fragments as follows: 3 Tabs and I put an button in the class BlankFragment, in its onClickListener I tried to open BlankFragment3 as follows, redirect to BlankFragment3
but it stops running and says:

java.lang.IllegalArgumentException: No view found for id 0x7f0c0068 (com.drunkpiano.fragmentlast:id/container) for fragment BlankFragment3{2a5d6e3b #0 id=0x7f0c0068}

Why? Is it because the container of replace() is for the whole 3 fragments including the tabs bar?

<android.support.v4.view.ViewPager
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" />
drunkpiano
  • 135
  • 6

0 Answers0