是否可以更改 TabHost/Widget 背景颜色?或至少是应用程序背景
我正在为我的 Android 应用程序创建一些自定义选项卡,但是设计者设计的选项卡顶部有小曲线。因此,在这些曲线之间应该有“透明”颜色。
制作曲线并不困难,但问题是选项卡主机显然具有主题背景颜色(在我的例子中为白色),而不是透明背景颜色。
我认为不可能制作透明的背景颜色,因为屏幕内容位于选项卡的上方(在我的情况下)。第二种选择是将选项卡内容“移动”到 tabWidget 顶部的一些像素,但似乎也是不可能的。最后一种选择是让应用程序背景颜色与默认应用程序背景颜色相匹配或使用可绘制对象作为背景。
如果这些事情可能的话?
如果不是,最糟糕的情况就是简单地将背景颜色添加到每个选项卡中;只是想知道。
谢谢!
I am creating some custom tabs for my Android app, however the designer designed the tabs with small curves at the top. So, between these curves there should be "transparent" color.
Making the curves was not difficult but the problem is that instead of a transparent background color, the tab host apparently has the theme background color (in my case White).
I don't think that it is possible to make a transparent background color as the screen content is above (in my case) of the tabs. The second alternative is to "move" the tabs content some pixels to the top out of the tabWidget but also doesn't seem possible. Last alternative, it would be good to have the application background color to match the default app background color or use a drawable as background.
If any of those things possible?
if not, the worse scenario would be to simply put that background color to each tab; just wondering.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您好,希望对您有帮助。
Hello I hope it helps you.