动作条的标签高度 [英] ActionBar tabs height

查看:133
本文介绍了动作条的标签高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改默认的动作条选项卡的高度,但找不到任何信息。有一些样式属性或方法来设置标签的高度? 谢谢你。

I want to change default ActionBar tab's height, but can't find any info about. Is there some style attribute or method to set height of tabs? Thanks.

推荐答案

这是你如何样式的标签。虽然,我遇到了麻烦,实际上得到的高度变化。我不知道,你可以通过一个样式的设置TabView的高度。您可能需要创建自定义视图并将其应用到你的标签在你的code。所有你需要引用的样式和属性都在SDK中。看在你正在使用的平台版本的价值观文件夹。这就是我通常找出如何做到这一点。

This is how you style the tabs. Although, I was having trouble actually getting the height to change. I'm not sure you can set a height via a Style to the TabView. You may have to create custom View and apply that to your tabs in your code. All the styles and attributes you need to reference are in the SDK. Look in the Values folder of the platform version you're working with. That's how I typically find out how to do this.

<style name="Widget.Holo.Tab" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
    <item name="android:height">#dp</item>
</style>

<style name="Your.Theme" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarTabStyle">@style/Widget.Holo.Tab</item>
</style>

这篇关于动作条的标签高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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