better Android XML Layout Editor than the one in Eclipse
I'm searching for a better Android XML layout editor than the one in eclipse. Preferable placing items by drag and drop to the correct X/Y position. With the current editor I have to try out figu开发者_开发知识库res to place it at the exact position ... is there an easier way ? (RelativeLayout is used)
So far, the only editor you will find is: http://droiddraw.org/ You can draw a layout from their webpage, since it's written in Java and they have an applet... or you can download it and use it locally. It has some nice features, like sending a test layout directly to a device.
If DroidDraw is the only one option then I wouldn't consider it as answer. It bases everything on AbsoluteLayout which is deprecated. It's near impossible to implement any complex enough flexible layout with help of this tool, as result your solution won't be okay on different screen sizes..
IntelliJ 12 has a much improved graphical interface over version 11. I prefer the IDE heavily over eclipse as I have found it much faster. The new graphical layout is very nice in this one.
Layouts are just horrible. The gui is worse than the xml, but both are horible, sorry to the people who have put time and effort into it, but trying to get controls where you would like them on the screen is far more difficult than it ought to be. Not many Apps that I know of that require a plain left to right or top to bottom layout.
I know that the scheme is meant to be as none-specific as possible, with just enough information so that the device itself can layout the App for it's size. Rare are the cases where we can just leave it up to the device.
Frankly a plain HTML/CSS layout is far better with much greater chance of success on multiple devices, and a lot easier for the developer.
So, orriginal poster, if your App can be a web app, then go with an Android web app. Familiar territory and all that.
Alternatively, do your layouts in code. In Windows Apps I usually do my layouts in code anyway. On the Android, I do put my controls in the xml file with just the control type and it's ID.
Then everything else is in code, the only magic you need now is to Detect the screen size which is explained here Android Detect Screen Size Remember the 'Screen to DP' part.
Plus you have your resizing in a single function which you call for any orientation change.
Before people start screeming 'CPU over load!!!' Consider this, how many controls do you usually have on the screen at any one time? Well it is actualy between one and 4. Some exceptions obviously, look at every app on your device, remembering that on many of the Apps that have multiple controls, those are grouped as a single item. So our resizing of upto 4 controls does not take any more time than the system takes to work it out on an orientation change.
AndroidStudio has a layout editor as well, although it is not different than IntelliJ, as AndroidStudio is based on IntelliJ. Also, I have experienced numerous crashes with the AndroidStudio layout editor, while doing simple tasks like adding an EditText.
The editor is visually nice though, when it works.
精彩评论