How to implement view pager in Android watch?

蹲街弑〆低调 提交于 2019-12-13 19:54:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!