简单选项卡布局中的意外视觉元素
下面的屏幕截图是来自 选项卡布局的应用程序的简化版本教程。您可以在选项卡下方看到一条黑色水平线。为什么它会在那里以及如何将其删除?
The screen shot below is of a simplified version of the application from the Tab Layout tutorial. You can see a black horizontal line below the tabs. Why is it there and how can I remove it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试从
FrameLayout
中删除android:padding
属性。如果您想在除顶部之外的所有内容周围填充,则必须使用padding/Left/Right/Bottom
属性。Try removing the
android:padding
attribute from theFrameLayout
. If you want padding around everything but the top then you'll have to use thepadding/Left/Right/Bottom
attributes.我认为这条线是由选项卡的实现方式产生的。如果您查看我的一个问题,关于奇怪的黑线我发现它是我正在使用的
ActivityGroup
的产物。这与选项卡使用的小部件相同。I think that line results from how the tabs are implemented. If you look at one of my questions about a strange black line I found that it was an artifact of the
ActivityGroup
that I was using. This is the same widget that tabs use.