Android的导航标签在屏幕的中间 [英] android Navigation Tabs in middle of screen

查看:167
本文介绍了Android的导航标签在屏幕的中间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序,我想有标签,在屏幕的中间和GMAP顶部反正​​是有在屏幕的中间位置的选项卡?

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?

下面是一个原始设计

推荐答案

您可以使用ViewPagerIndicator库(使用TabPageIndicator控制)与ViewPager控制,而这些都是从动作条完全独立的,可以放置在任何地方你喜欢。下载源代码,并检查了示例应用程序。在code是非常简单的。

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

<一个href="https://github.com/JakeWharton/Android-ViewPagerIndicator/blob/master/sample/res/layout/simple_tabs.xml" rel="nofollow">https://github.com/JakeWharton/Android-ViewPagerIndicator/blob/master/sample/res/layout/simple_tabs.xml

这篇关于Android的导航标签在屏幕的中间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆