سؤال

I want the app structure like Sliding drawer menu + Tabs like in Google Play store app.

I searched and got the one on GitHub the awesome PagerSlidingTabStrip.

I have somehow customized this project. Project is working nice.

Now it looks like

enter image description here enter image description here

I want to switch the tabs when I click on sliding drawer menu list items. Like if I click on Home the tab should switched to Home, or if Click on AV sections from the menu it should switch the tab to AV sections.

هل كانت مفيدة؟

المحلول

You should handle this by the viewpager

ViewPager viewpager= (ViewPager)findViewById(R.id.viewpager);
viewpager.setCurrentItem(YOUR DESIRED INDEX);

نصائح أخرى

In the class codeSuperAwesomeCardFragment.java content in the line:

v.setText("CARD " + (position + 1));

Do the changes with respect to Position

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top