I was using DroidDraw, working through the tutorials. Looking at the resulting XML and the Java code to tie them together, I was thinking that I could build a program to automate that process, so I started noodling something together. But before I go off and totally remake the wheel, I was wondering if something like this hasn't already been made before?
I'm thinking of something that takes the layout XML from DroidDraw, and outputs a Java application that works, and is ready for you to add your own code.
It seems pretty basic, has it been done and I've just not spotted it? I've tried Google searches, but I don't see anything similar.
The built-in UI editor that comes with Eclipse used to be pretty crappy - however, it's now getting better and better. Rev 11, which is coming out soon will a lot of new and useful features also.
Give it a try - I think you'll find this is the best tool.
The resulting XML file you can take from DroidDraw requires no Java code.. you simply setContentView(R.layout.name) and that's it!
Just use IntelliJ or Eclipse to set up a skeleton project for you, and import the XML you created via DroidDraw.
There is App Inventor. I have not tried it myself but it sounds pretty much like what you want.
As far as I know it is a very visual approach to develop an application.
Related
What I'm Trying to Do
I'm trying to create something that will allow customers to customize how our android application will be set up. This should be a UI editor that sits on our web server and, upon save, will communicate with our android project so that it can set itself up.
What I've Done So Far
I've been looking into something like a Business Project Management tool that can export itself as an XML (or equivalent). For example : https://demo.bpmn.io/new ... The file that even a simple diagram produces (BPMN) seems far more complicated than what we need, though.
What I Need
We can create something on our own or customize an open source project like this to better fit our needs, but I'm not sure if BPMN is the best approach and I've been having trouble finding sources to learn more about it. Is there a better approach I can take?
My project is still in its very early stages and I would like to make sure I'm at least starting off on a good path.
I've just coded android for a few months, and I really enjoy it, but I find myself writing the same "(TextView)findViewById(R.id.mytextview)" code over and over again.
Coming from asp.net I can't help but wonder why there's no auto-generated class from which I can access my xml-declared views(controls) strongly typed?
Actually I kind of solved it for myself by creating a "viewshelper"-class for complex activities, so I can do "_views.mytextview" when I need the textview, but I still have to maintain these classes by hand each time I add or remove views.
Am I missing something, or should the android sdk do this for me?
Take a look onto roboguice, it looks like the library takes care about the problem.
IMHO, You are missing the Java approach for application development.
This is quite normal for those that use Eclipse (with out plugins) at the beginning this seam to be very problematic, but now i think that that show only the developer limitation.
I am new to android.
As I know, an android app used xml to construct the gui.
Is there a tool to create the gui xml from a visual drag & drop editor?
Have a go with Google App Inventor.
App Inventor only output .apk file. Is there a way to output the XML layout?
DroidDraw you give some help. But not quite easy to use. It can only produce some basic structure.
Well, there's the gui builder in eclipse, which is useful in a few cases. Although, your better of just making the XML yourself, and doing the fine tweaking in the gui editor.
There is droid draw, but from my experience with relative layouts it fails to properly build the xml.
There is also app inventor, but I haven't tried it though so I don't know how well it works.
If your looking for something that is as nice as the iPhone's gui builder, from my experience anyway, your out of luck. Roll up your sleeves and start hacking out xml. (Or java code if you want to write 10x as much). Sorry to have to tell you that.
I am currently starting to create an app for a small charity company. But I'm not entirely sure how to properly learn how to code for the Android OS. I have searched online for tutorials, but most stop at the same stage and only show you how to launch the "helloWorld" app.
My question is this:
1) Will using solely XML be sufficient to code an app? Does it require working in partnership with Java?
2) Does anyone know of any books, recommended books of course, that break everything down for you step-by-step?
Android Developer site very good to give you all ideas. Start from Hello, World
1.) Not at all. XML is ONLY used for the layouts.
2.) There are a few books out there that I'm sure someone will come along and recommend, but I've found the tutorials here to be the best start.
In your case, I'd look at AppInventor which allows you to create small Apps without coding (at least that's what it says, haven't used it yet myself)
1) No, you can use XML for interface, but you can't write an Android app in XML :) You are not required to work with Java, but Android language is based on Java, so knowing Java is an advantage while learning to code.
2) Did you installed Eclipse and the plugin for Android?
The Android Training is pretty useful, and I've learnt a lot from the tutorials and the sample code provided there. (The Notepad app is way more complex than the Hello World tutorial ;)!).
Also, take a look at the answers on that question: How can I learn Android?
I'm not looking for a mock up tool, I'm looking for a reasonable GUI design tool for the final product in the style of Apple's Interface Builder. Droid Draw is buggy, out of date and inaccurate in my experience. Using the Eclipse plug in to do a complex layout makes going to the dentist seem fun. I'd even settle for hand-coding CSS pixel coordinates over the current model. Is the solution found here: http://andrdev.blogspot.com/2010/01/gui-designer.html the best, or have one of you ninjas found something else? If there is an actively developed project that isn't ready for show yet, I'd like to know that as well.
I don't see why you'd want something like this (especially the tool you posted a link to). That would mean learning a whole new language just to use that tool. Why not learn the XML definitions directly? Yes, it's a relatively steep learning curve but once you're up to speed you'll see it's great. Also, doing XML by hand will allow you to optimize your layouts a lot (there are a few articles out there on how to do that).
As to the Eclipse plugin, I find it quite awesome, although I never use it directly. I don't add/remove/edit elements with it. I write my XML code and then test it with the plugin so I don't have to recompile the app > upload it on the emulator > run the app > go through all the activities to get to the one I'm editing right now, just to see that I need to add a little more padding.
Also, in general, it's best to use the tools you are given. Third party tools are very likely to become outdated, discontinued, deprecated, ...
In conclusion: do it the right way. Write your XML by hand. Use the Eclipse plugin as a convenience tool.