Android Tab 高度浪费空间!一定有办法将其最小化!

发布于 2024-09-24 05:09:18 字数 69 浏览 1 评论 0原文

我没有使用图像图标,仅使用(固定大小)文本指示器。如何将选项卡高度设置为其最有效的大小?[wrap_content 无效。]

I am not using an image icon, only a (fixed size) text indicator. How do I set the tab height to its most efficient size?[wrap_content has no effect.]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠檬心 2024-10-01 05:09:18

您想要使用 setIndicator 方法来设置应在选项卡内显示的视图。这将允许您使用自定义视图

TabHost 文档

You want to use the setIndicator method to set the view that should be displayed inside the tab. This will allow you to use a custom view

TabHost docs

孤单情人 2024-10-01 05:09:18
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 35; 
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 35; 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文