问题
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?
来源:https://stackoverflow.com/questions/50849626/how-to-implement-view-pager-in-android-watch