GUI in android NDK - android

Can anyone tell me how we can create or access GUI in Android NDK.Basically I want to reuse some existing UI components while in some places I need to create new ui components

Short of using Qt, which I find that option purely unacceptable at this time, you will probably need to design your own gui. I check in and see if the NDK community has grown for this, and the most recent thing I have found was Qt.
Google should give this section of android more love, before Ubuntu and others do.

You can write new UI components in Java as subclasses of View. In fact this is how most of the system widgets are written.
Barry

Related

Is it possible to build android widgets in flutter?

The fact that Flutter heavily uses the word widget makes it difficult to find documentation on this topic.
On Android (I believe this isn't possible on iOS), we can add widgets on our home dashboard, allowing us to see app-related information or to trigger one-click actions without needing to open the app in question.
Is it possible to build such "widgets" in Dart & Flutter? Or should I do that in java and somehow plug it with my flutter app?
Can you share an example of a resource containing one?
EDIT: I have no android development experience, but it sounds like using a drawable canvas might do the trick.
I could find some canvas flutter code, but I can't connect the dots yet.
EDIT 2: From this Github issue, it looks like writing android home widgets in flutter is a no go since Flutter has its own rendering engine. I'm keen on learning kotlin to get this done, but if someone knew of nice tutorials to help me with that, that would be immensely helpful.
As the OP mentioned in an edit, this isn't currently possible because Flutter uses a custom rendering engine.
Widgets are quite limited in what they can render; the documentation explains that only certain layouts may be used. You could theoretically use Flutter's software renderer to render to an image in a seperate instance from the main one and display that, but that would be very technical, likely not very performant, and not straightforward at all!
Here is a quite detailed tutorial for widgets that guides you through creating a few examples although in Java. The same logic applies with just a few syntactical changes for Kotlin as the classes are pretty much interchangeable. However, realistically, most of the work is in the layout with some wiring in android; if you're already familiar with Android & Java, keep in mind that Kotlin does add a bit to your app size (The Kotlin runtime adds about 7,000 methods and ~1MB to your debug APK from the kotlin on android FAQ) and since most of your logic should be in flutter you probably won't have all that much Kotlin/Java code if this is all you're using it for (although if you're new to both Java & Kotlin, Kotlin is arguably more friendly in some ways).
Also, to be able to communicate between your flutter app and the java/kotlin backend, you'll need to use platform channels as described in the flutter documentation.

static UI analysis with my own grammar rules (want to make eclipse android visual UI guidelines checker)

I want to make eclipse plugin or standalone app that will help user to check if android xml layout files are according to android user interface guidelines (that I have added earlier from). User can also input his own guidelines into existed grammar rules. Also he can choose some UI guidelines patterns (ones that is created for his company or some existed ones). What's the best approach to develop this app? What's the easiest and fastest way? Which language/approach I should choose? Can you provide me if possible with some tutorials/books/examples for this? I have found that it could be done with JavaCC(but it's difficult,user should edit/create grammar rules). Also I have found some recommendations to do it with DSL(Domain specific languages), code generators but I don't know how to do this.
I am doing UI checker for my master thesis. It should enable general code analysis in next phases - for some other students (thesis) to continue with this project (tracking navigation, coding style,etc). I am doing part which checks xml files with my grammar rules(which can be added,edited by users) and shows visually in gui editor where is warning(font too big, colors not compatible, etc.). My checker would work for android, but other students will make it for ios and windows phone.Thank you in advance.
This tool already exists, it is called 'Lint' and already is built and executed automatically by the Android IDEs:
http://tools.android.com/tips/lint
The tool is designed to allow you to add your own custom rules and checks:
http://tools.android.com/tips/lint/writing-a-lint-check
There are other static analysis tools (PMD, FindBugs, etc) that can also be used with Eclipse already, that could also be extended for your purposes. I don't think you want to create your own plugin, but should extend the existing tools.

Is there any other method to creating UI for android application rather than XML?

It seems to difficult to creating UI for android application using XML layout (:at least for me).is there any plug-ins or any other method by which I can create UI for Android application ??
It is difficult at first but once you're used to it it is second nature. If you intend to take up Android development seriously, XML UIs is an essential skill and you should learn it well.
That said, the Eclipse setup for Android has a GUI layout maker as well, and there is DroidDraw as well.
You can also recreate about 95% of XML layouts using Java code if it suits you better.
Check out http://developer.android.com/tools/help/adt.html which has GUI design tools. It's pretty easy, you can just drag and drop the widgets you like.

Developing UI for Android

I am planning to develop an Android based mobile for my Human Computer Interaction based project. I am looking for a UI designing application for Android platform. Can it be achieved with Eclipse or is there a better way of developing UI for Android applications that could be used directly with coding ?
Thanks,
Manoj
You can directly code your UI too if you want to. It just takes long, and you open a window for errors.
Developing UI with eclipse using XML is great and easy, why don't you want to use it?
If by UI you mean "not-the-basic-UI", then it's possible too with eclipse - if you want a customized view then you code it, and if you want the normal UI views to look differently, theres a way to do that too (I'm pretty sure you can set your own pictures for button-state-pressed, button-state-selected and so on...)
You need to be more specific with what you want to do.
Use java EE eclipse with (Android Development Tools) plug-in. Upgrade the android SDK in eclipse.
Eclipse has an extension called ADT (Android Development Tools).
Hope you have installed it. Here is the link for installing Android in Eclipse.
Eclipse provides the help for design the UI for android. It is just drag and drop.
Hope this helps
Eclipse has a builtin GUI builder that is fairly good, there is also DroidDraw, which may be slightly easier to use. I would recommend using Eclipse's builder myself, both are somewhat limited without hand-coding XML really.
Quick side note: Be sure NOT to use AbsoluteLayout, as I have seen a few people starting out with Android programming fall into the pitfall of thinking it will make GUI design easier. Issues will arise very quickly.

Android: Active project attempting to improve the GUI design process?

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.

Categories

Resources