android Navigation Tabs in middle of screen

早过忘川 提交于 2020-01-04 03:38:06

问题


In my app i want to have tabs in the middle of the screen and a gMap at the top is there anyway to position the tabs in the middle of the screen?

Here is a raw design


(source: qnex.me)


回答1:


You can use ViewPagerIndicator library (using TabPageIndicator control) with a ViewPager control, and these are completely separate from the ActionBar and can be positioned anywhere you like. Download the source and check out the sample app. The code is very straightforward.

Here's an example straight from the source of the sample app

https://github.com/JakeWharton/Android-ViewPagerIndicator/blob/master/sample/res/layout/simple_tabs.xml



来源:https://stackoverflow.com/questions/14348816/android-navigation-tabs-in-middle-of-screen

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