有没有做Android布局设计的好工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2783586/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a good tool for doing Android layout design?
提问by Brian ONeil
I have tried DroidDrawand the Eclipse layout editor and both seem very difficult to create anything other than very simple layouts. I find myself dropping back to the XML file to be able to manipulate it.
我已经尝试过DroidDraw和 Eclipse 布局编辑器,除了非常简单的布局之外,它们似乎都很难创建任何东西。我发现自己又回到了 XML 文件以便能够操作它。
Has anyone found any good tools to design the actual screens? I am not looking for a mock-up tool... but an actual tool to create the XML layouts.
有没有人找到任何设计实际屏幕的好工具?我不是在寻找一个模型工具……而是一个创建 XML 布局的实际工具。
Update:The new eclipse designer with 2.3 is better, but honestly I thought that it would be further along. I don't mind dropping down to the XML when necessary, but just seems like it is time to get some good designer tools in the space.
更新:带有 2.3 的新 eclipse 设计器更好,但老实说,我认为它会更进一步。我不介意在必要时使用 XML,但似乎是时候在该领域获得一些好的设计器工具了。
回答by Alex Volovoy
Over the years i've learned that there is no good drag and drop tool for anything. Code, forms, layouts, at the end the best way to create something is going to the src. Since we're talking about mobile device here, good, optimized layouts are important. Therefore it's worth to spend some time and manually edit XML, it will make product better.
多年来,我了解到没有什么好的拖放工具。代码、表单、布局,最后创建东西的最佳方式是去 src。由于我们在这里讨论的是移动设备,因此良好的优化布局很重要。因此,花一些时间手动编辑 XML 是值得的,它会使产品更好。
回答by pleerock
try IntelliJ IDEAIDE. It has a good android layout design tool
尝试IntelliJ IDEAIDE。它有一个很好的android布局设计工具
回答by Andreas Rudolph
I created a tool that allows you to scale/adjust your layouts for tablets and small screen devices and made a blog post about it here: http://onemanmobile.blogspot.com/2012/04/how-to-scale-your-android-layouts-to.html
我创建了一个工具,允许您缩放/调整平板电脑和小屏幕设备的布局,并在此处发表了一篇关于它的博客文章:http: //onemanmobile.blogspot.com/2012/04/how-to-scale-your- android-layouts-to.html
Basically, defining your layouts in dp units is not enough if you want your app to fit on all devices and tablets, since there's four different "density-buckets". This tool will allow your layouts to be converted into fitting these density buckets.
基本上,如果您希望您的应用程序适合所有设备和平板电脑,以 dp 单位定义布局是不够的,因为有四种不同的“密度桶”。此工具将允许您的布局转换为适合这些密度桶。
So in your case, define one layout - and have it scaled as you please..
因此,在您的情况下,请定义一种布局 - 并根据需要对其进行缩放..
回答by Fraggle
Yeah, its not easy. But if you work with it (Eclipse that is) long enough and you'll figure out the tricks to make things work well.
是的,这并不容易。但是,如果您使用它(即 Eclipse)足够长的时间,您就会找出使事情顺利进行的技巧。
With complex screens the biggest problem is that they tend not to scale up/down as well as simpler screens. So you may end up designing the screen a few different ways to support multiple screen sizes.
对于复杂的屏幕,最大的问题是它们往往不像更简单的屏幕那样放大/缩小。因此,您最终可能会以几种不同的方式设计屏幕以支持多种屏幕尺寸。
Interestingly enough, for iPhone screen design, the layout part is extremely easy due to the fact that absolute positioning is used, so you just drag stuff exactly where you want it. So for complex Android screens maybe use absolute layout. Most people will tell you this is a bad approach, and I've never used it myself, but who knows. Just keep in mind they myriad of screen sizes that your app will be shown on.
有趣的是,对于 iPhone 屏幕设计,布局部分非常容易,因为使用了绝对定位,因此您只需将内容拖到您想要的位置即可。所以对于复杂的 Android 屏幕可能使用绝对布局。大多数人会告诉你这是一个糟糕的方法,我自己从未使用过,但谁知道呢。请记住,它们将显示您的应用程序的无数屏幕尺寸。