EditText 字段的外观
Android 模拟器中的 EditText
字段具有内部阴影和圆角。我的三星 Galaxy 上的同一个应用程序显示 EditText
字段平坦且完美的矩形。
我意识到 Android 版本之间存在差异,但有没有办法影响 EditText
字段的这些属性?
The EditText
fields in the Android emulator have an inner shadow and rounded corners. The same app on my Samsung Galaxy shows the EditText
fields flat looking and perfectly rectangular.
I realize there are differences between the versions of Android but is there a way to influence these properties of EditText
fields?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
大多数情况下最好使用默认样式,这是用户所期望的。
In most cases it is better to use the default style, this is what the user expects.
您可以完全定义 UI 字段的外观。如果您想要完全自定义的外观,请选择 9 块背景图像。您还可以使用 xml 可绘制资源定义外观,它允许圆角和渐变。
如果您定义外观,则所有手机上的外观都会如此。在我看来,制造商和运营商之间高度可变的 UI 变化是 Android 最令人沮丧的问题之一。
我们合作过的大多数客户都有完整的 UI 规范。尽管存在使用“默认值”的争论,但大多数商业应用程序并不这样做。至少对于风格的东西来说是这样。我仍然认为菜单、通知、首选项等应该是 Android 标准。
You can completely define the look of your UI fields. If you want a fully custom look, go for a 9-patch background image. You can also define a look with xml drawable resources, which allow for rounded corners and gradients.
If you define the look, it will look that way on all phones. the highly variable UI changes between manufacturers and carriers is, in my opinion, one of the most frustrating issues with Android.
Most clients we have worked with has a complete UI spec. While there is an argument for using "the default", most commercial apps do not. At least for the style stuff. I would still argue that menus, notifications, preferences, etc should be Android standard.