ViewPagerIndicator - Set the TabPageIndicator to the center

前端 未结 3 2185
轻奢々
轻奢々 2021-02-14 19:37

I make an timetable application for android and I\'m using ViewPagerIndicator as fragment. But now I\'ve a problem, I want to get the TabPageIndicator to the center. Like this:

3条回答
  •  北荒
    北荒 (楼主)
    2021-02-14 19:46

    Use it like this :

    TabPagerIndicator tbi;
       ViewPager pager;
    

    in onCreate() do like this

    tbi=(TabPagerIndicator)findViewById(R.id.something);
       tbi.setViewPager(pager);
    

    I hope this will work out for you. :D

提交回复
热议问题