【问题标题】:Android: Ice Creame Sandwich like tab layoutAndroid:冰淇淋三明治类似标签布局
【发布时间】:2012-02-08 19:45:58
【问题描述】:

如何在 API 级别 10 中创建类似 Ice Cream Sandwich 的选项卡布局?

Image Preview http://docs.xamarin.com/@api/deki/files/482/=23_-_Tabs.png

我不知道如何自定义标签布局。我已经实现了 Action Bar,我想要它下面的标签。

*渐变操作栏和它下面的渐变选项卡,看起来并不酷。

【问题讨论】:

标签: android


【解决方案1】:

您可以使用ActionBar 创建这样的标签。由于ActionBar从android 3.0开始支持,所以有一个旧版本的支持包。

你可以使用ActionBarSherlock

The library will automatically use the native action bar when available or will automatically wrap a custom implementation around your layouts. This allows you to easily develop an application with an action bar for every version of Android back through 1.6.

访问ActionBarSherlock地址-ActionBarSherlock

编辑:检查此Application。它使用ActionBarSherlock 来支持旧版本。

【讨论】:

  • 你从这个link得到图像吗
  • 是的!我可以绘制上底线,但无法增加所选标签底线的厚度。
  • 是的,我从那个网站得到图像。
【解决方案2】:

您正在寻找的是操作栏标签。他们的旧方式,TabHost 已被弃用。

这是一个很好的链接,可帮助您开始实施它们。 Action Bar User Interface. 这是 Google 为您带来的 full example。至于设置 ActionBar 和选项卡的样式,here's a great example.

【讨论】:

猜你喜欢
  • 2013-03-29
  • 1970-01-01
  • 1970-01-01
  • 2014-03-26
  • 2012-05-02
  • 1970-01-01
  • 1970-01-01
  • 2012-01-28
  • 1970-01-01
相关资源
最近更新 更多