Search code examples
javaandroidandroid-viewmain-activity

Android application with only one Activity


Is it bad programming if I use only one Activity for a game like pong? I have different classes to do different tasks and handle touches etc. but I only have one main Activity which changes what is drawn on screen based on user input. I currently only have three views.

Should I use different Activities for all these views or is one MainActivity fine to handle all of them?


Solution

  • Id say one activity to handle all of the views in a pong game is fine, if you put the views in seperate activitys they wouldnt all be able to work in one activity at the same time it just wouldnt make sense, one activity to handle all the views in a pong game sounds right now maybe if you had a title screen or options screen you could use different activitys for that