第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何使用TabLayout在Fragment中使用CardView行實現(xiàn)RecyclerView

如何使用TabLayout在Fragment中使用CardView行實現(xiàn)RecyclerView

函數(shù)式編程 2019-08-16 16:31:54
如何使用TabLayout在Fragment中使用CardView行實現(xiàn)RecyclerView我想在一個使用TabLayout的Activity中實現(xiàn)一個ListFragment,這樣我就可以在不同的列表之間滑動。最后它應(yīng)該成為一個預(yù)訂應(yīng)用程序,以便您可以選擇不同的學(xué)科,并預(yù)訂一個特定的時間段。然而到目前為止,我只實現(xiàn)了ListActivity或標(biāo)簽活動(android studio中的標(biāo)準(zhǔn)活動),但不是兩者。如果有人可以提供幫助,我會很高興的。標(biāo)簽式活動: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 savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_diciplines);         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);         setSupportActionBar(toolbar);         // Create the adapter that will return a fragment for each of the three         // primary sections of the activity.         mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());         // Set up the ViewPager with the sections adapter.         mViewPager = (ViewPager) findViewById(R.id.container);         mViewPager.setAdapter(mSectionsPagerAdapter);         FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);         fab.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)                         .setAction("Action", null).show();             }         });     }
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 480 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號