小编edd*_*e_7的帖子

如何使用TabLayout在Fragment中使用CardView行实现RecyclerView

我想在一个使用TabLayout的Activity中实现一个ListFragment,这样我就可以在不同的列表之间滑动.最后它应该成为一个预订应用程序,以便您可以选择不同的学科,并预订一个特定的时间段.然而到目前为止,我只实现了ListActivity或标签活动(android studio中的标准活动),但不是两者.如果有人可以提供帮助,我会很高兴的.标签式活动:

public class Diciplines extends AppCompatActivity {

    /**
     * The {@link android.support.v4.view.PagerAdapter} that will provide
     * fragments for each of the sections. We use a
     * {@link FragmentPagerAdapter} derivative, which will keep every
     * loaded fragment in memory. If this becomes too memory intensive, it
     * may be best to switch to a
     * {@link android.support.v4.app.FragmentStatePagerAdapter}.
     */
    private SectionsPagerAdapter mSectionsPagerAdapter;

    /**
     * The {@link ViewPager} that will host the section contents.
     */
    private ViewPager mViewPager;

    @Override
    protected void onCreate(Bundle …
Run Code Online (Sandbox Code Playgroud)

android listactivity android-fragments

23
推荐指数
1
解决办法
5万
查看次数

标签 统计

android ×1

android-fragments ×1

listactivity ×1