How to implement view pager in Android watch?

2019-08-07 08:32发布

The requirement of my watch application is that we need to implement a view pager in it. I have implemented the same in my Android app. In my Android app I am using the following classes:

HomeActivity extends FragmentActivity

// is of type support v4

CustomViewPager extends ViewPager

//is of support type v4

HomeFragmentPagerAdapter extends FragmentStatePagerAdapter

//is of type support v4

My Android Wear activity extends

WearHomeActivity extends WearableActivity

So here I cannot use getFragmentManager() and other such methods since other classes are of type support v4, neither can I extend my activity to FragmentActivity since I have already extended it to wearable.

So what is the solution for this?

0条回答
登录 后发表回答