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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With