Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I just wrote a Java program for a game and I was wondering how I could get the same game to run on Android using Android Studio.
I noticed that Android does not support JFrame, though. What is the Android equivalent to JFrame?
In Android what you would usually do is subclass Activity if you want to make a "screen" and View if you would like to make a UI widget.
But before you subclass any of them you should know that while they have some similarities to JFrame, they are VERY different and there are a lot of Android specific stuff you need to know about before you start using them. I would start by taking a look at managing activity lifecycle.
For an example of a way to make simple 2D game in Android, take a look at this.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 days ago.
Improve this question
I have an exiting Android app that uses Java and XML. I want to reface it, and i need informations.
This app use Android specification like the mobile position, modification of te current antenna (2G, 3G, 4G, 5G) ... and a local database with SQLite.
So I need to know if i can make my graphical interface with react and have interactions whith my java code to access to this Android properties. Is it possible to call java functions with react native ?
Can i use React or did i just have to use XML like i did before ?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I have developed a game with Java in Eclipse, I would now like to take this 1 to 1 and make it into an app, how can I do this? Is that possible? Can I transfer this to Andriod Studio?
I donĀ“t know how i could make this. Do you know a video or an intruduction?
The android JAVA is kinda tricky. It violates the Java principle of Write Once Run Anywhere
To transfer any java project to android, it is best to:
Separate your Java code that handle UI from the one that handles the logique (its even better to wisely organize the project into packages
create a new blank android project
copy the logique Java code/classes to java resource folder
Convert the UI Java code/classes into android activities
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to make android program :--
As like this picture.
How can I make??
I have to try Animation??or video???
Pls just tell me the process how can I achieve that.
I think the simplest method would be to use the AnimationDrawable class. The process is pretty simple. You would make a series of images in Illustrator, Photoshop, etc. showing the heart in its various stages. Then you would copy them to the /res/drawable folder in your Android project. Then follow the code examples here. As shown, you can specify the duration of each animation frame as XML code.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm in the early midst of making a game with Java, and would eventually like to turn it into an android application.
All the developer technical stuff aside, will the code itself remain the same, or will I have to rework the better part of it?
Thanks in advance for the feedback
Yes,you can do like that where your rendering part need to be changed if you want to use it in android. So the better option is use some framework to port your code to work in Android system as well. LibGdx is such a kind of framework where you can develop and test your application in stand alone mode and without changing your code, you can run it in Android as well. Please refer LibGDX site for more information
Android code is java, so yes!
You'll have to change some stuff. For instance, if you're using swing to show stuff on the screen, you'll have to change it to use the android API; but the core of the code should remain the same.
I remember doing my very first videogame in java. Porting it to android only required me to modify little.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to develop games on android, am good with java.
i already tried using bitmaps and canvas to cook up a sample game, just a ball bouncing in the screen, but had issues with placing more items and stuffs.
I was told to go learn c++, can't i use java to build it? and if so how can i get API and documentation to help me in game development?
(need help thanks.)
You really don't need to know c++ to be able to program games on android. Go follow this tutorial and learn OpenGL ES 2.0:
http://developer.android.com/training/graphics/opengl/environment.html
This will help you in being able to learn shapes and then show you how to animate your shapes. For your purposes, I would say this is a great start.