Can you use java.swing and javafx for android development? - java

I dont really know a lot about about android development and i was wondering if it's possible to use java.swing and/or javafx for it.

You can use JavaFXPorts to develop JavaFX applications (not Swing applications) that are deployable on Android. Refer to the JavaFXPorts documentation for more information.
You will need to make your own assessment of whether using JavaFXPorts is an appropriate approach for your application or if you are better off coding purely to the native Android SDK provided by Google or using another 3rd party development SDK such as Unity. I will make no such recommendation here.

No it's not possible. Androids java (Go) does not include the java.swing and the javafx packages.
Android does include it's own gui packages more specialised for it, so I don't see why you would even want swing or javafx.

No you can't use Swing or JavaFX because Android has another type of architecture to render the views. Visit this official website to learn more about views in Android
http://developer.android.com/intl/es/guide/topics/ui/overview.html
Hope it's helps.

Related

Emulate Android in Swing

I want to be able to run my Android code/app on Windows/Mac/Linux/etc. but not use an emulator, as they are slow/cumbersome.
I want a real Java SE app, but to reuse my Android code.
My idea is to make an Android emulator using Swing, read the layout files and create the widgets in Swing and map between the 2 UI event models, life cycle, and library classes.
Question is, does such a thing exist already, I googled it, but could not find anything.
Otherwise I will start an open source project for it myself. Anyone interested in helping is more than welcome.
So I created an open source project "Swingdroid" that lets you run Android apps and Java swing desktop applications.
You don't need to use an emulator or change any code. It loads Android layout files and activities and renders them using Swing.
On GitHub here,
https://github.com/BotLibre/BotLibre/tree/master/swingdroid
I totally agree with #muratgu. But, if you just want to parse Android layouts (views) xml files and render them using Java Swing, this is possible and this has already been implemented, before deciding to make your own implementation, you'd better check the wysiwyg feature of UI editor in Android Studio.

Android gui design tools or framework like bootstrap

I am a web developer, recently i have developed a android app using cordova.
But my application is slow, so i deside to developed the same app using andoid no native code. But the challenge is making same gui. i am new in android.
So my question is that what tools i use for gui design, and is there any framework like bootstrap? thanks in advance.
Maybe this might help: http://www.androidbootstrap.com/
Github link: https://github.com/AndroidBootstrap/android-bootstrap
Android app is also a browser app designed in xml, what kind of app you want to build if its an offline app you have design in xml but if it's online app (ex: playstore) you can use WebView it gives you a browser(with your webpage address hard coded in it) within an app and there you can open your mobile website.
Just like other apps do flipcart, jstdial, amazon etc.
Tools: Android Studio is best but for Start download Eclipse Atd bundle its comparatively light later you can switch to Android Studio.
Unfortunately there is no
and
www.androidbootstrap.com/
You have to do all your design in xml resource, where you can use tags like - style, selector, layer-list, item, shape etc. And these resources have to be controlled dynamically using java (in activity).
In Developers documentation of android (provided by Google) you will find details Style elements

How to use javaanpr in Android app?

I would like to use this library for Car plate recognition in my Android app.
I red about JNI, but i'm still not able to get some good explained tutorial, how can i use use this library in my Android app.
http://javaanpr.sourceforge.net/
Thanks for any advice.
In it's current state, you will not be able to use JavaANPR on Android. The problem is, that JavaANPR's core functions use the java.awt package quite heavily (for example Photo.java) and Android doesn't support AWT mostly (AWT contains native code, and Android has it's own android.graphics package). There have been some attempts to port AWT to Android, but AFAIK they all failed/died eventually.
Disclaimer: A while ago, I forked JavaANPR in order to make it more library-like. It shouldn't be too hard to port the AWT code in JavaANPR to android.graphics though and you are more than welcome to submit a pull request!

Java desktop application with google maps

I need help with these, I am currently developing an a desktop aplication in java with netbeans IDE.
One requirement of the app is that must have a map on it.
I was serching and i find these: https://today.java.net/article/2007/10/24/building-maps-your-swing-application-jxmapviewer.
But i try to downoad the JXMaptKit or the JXMapViewer but i dnd't found it.
Can anyone knows a workaround of that problem or an example that i can use?
Thanks!
PD. the app that i'm currently developing is for academic purposes.
You might want to have a look at a modern JavaFX 2 framework which uses Webkit-based WebEngine to render a webpage. Here is a Google Maps demo: http://fxexperience.com/2011/05/maps-in-javafx-2-0/?

Convert android project to java project

I've just finished developing an application for android. I want to have a desktop version that is based on java, too.
I have to convert all layouts to swing and what other conflicts I may face, god knows.
Is there a tool for converting android apps to jar standalone? What is the easiest way to do this?
There is no tool to do this, as Android and Normal Java apps are very different.
The best you could do is move the non platform specific code into a library project, and reference it from both the Java and Android applications. So all code that doesn't use any import with android in it should be movable into the library, while all your swing/android specific code will go into the referencing projects.

Categories

Resources