Android XML 样式
我正在使用主题来设置 Android 中小部件的样式。
使用代码:
<item name="android:width">200px</item>
...我可以将小部件的宽度设置为 200px。
但是我如何指定“wrap_content”和“fill_parent”?
那里不允许使用字符串!
I'm using themes to style widgets in Android.
With the code:
<item name="android:width">200px</item>
... i can set the width of the widget to 200px.
But how can I specify "wrap_content" and "fill_parent"?
Strings are not allowed there!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
wrap_content
和fill_parent
对layout_height
有效,而layout_width
对宽度有效。wrap_content
andfill_parent
are valid forlayout_height
andlayout_width
not width.