Can I put a fragement in a viewpager in an extra container?

陌路散爱 提交于 2020-01-06 15:16:06

问题


Is it possible to put one of the fragments in a viewpager inside a framelayout? My idea was to do something like this:

<android.support.v4.view.ViewPager
    android:id="@+android:id/viewpager"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</android.support.v4.view.ViewPager>

What I would to do is have all fragments in the viewpager, except for one, that should in the FrameLayout container which itself is a page in the viewpager.

How can I do that if it is possible at all? Or, is there another approach to achieve this?

来源:https://stackoverflow.com/questions/22170784/can-i-put-a-fragement-in-a-viewpager-in-an-extra-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!