如何在 Android 中预览渐变和形状?
是否有应用程序或工具可以预览 Android XML 渐变和形状?每次修改 XML 时都必须在模拟器中运行应用程序,这是非常烦人的,这应该是一个更好的方法,但谷歌什么也没说。
Is there an application or tool that can do a preview of Android XML gradients and shapes? Is very annoying having to run app in emulator each time I modify XML, it should be a better way but Google says nothing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从 ADT 11 开始,eclipse 插件允许从 xml 的视图模式预览渐变和可绘制对象。在 ADT 12 中,资源选择器对话框中甚至有一个可绘制预览。
确保您已更新到 ADT 12 以及 SDK Tools r12。以下是相关的发行说明:
ADT 12.0.0(2011 年 7 月) )
视觉布局编辑器:
ADT 11.0.0(2011 年 6 月)
可视化布局编辑器:
我个人一直在使用 ADT 12,并且可以从图形布局编辑器本身查看渐变和自定义视图。
As of ADT 11, the eclipse plugin allows for a preview of gradients and drawables from the View mode of the xml. In ADT 12, there is even a drawable preview within the resource chooser dialog.
Make sure you have updated to ADT 12 along with SDK Tools r12. Here are the relevant release notes:
ADT 12.0.0 (July 2011)
Visual Layout Editor:
ADT 11.0.0 (June 2011)
Visual Layout Editor:
I have personally been using ADT 12, and can view gradients and custom views from within the graphical layout editor itself.
仅供记录,如果您有 Eclipse Galileo,正确更新的步骤是:
它抱怨某些软件包未签名,但最终安装并运行良好且轻松。
Just for the record, steps to properly update, if you have Eclipse Galileo, are:
It complains about some package not signed but in the end installed and worked nice and easy.
在 Android Studio 中:
In Android Studio: