I'm creating a 2d game for android.I want to handle physical buttons on Android but what i have to do if i will handle these buttons from another class not from Activity.Because i'm using my own screen class based on opengl in my game and i want to handle menu buttons from different screens.
1 Answer
You can use TabActivity to switch between two different activities.
-
TabActivity
is deprecated. It is encouraged to use the Android Support Package to implement tabs within anActivity
. Commented May 20, 2012 at 0:58 -
TabActivity is meanness for my situation.I'm asking that how i can reach this functionality from a sub class. Commented May 20, 2012 at 1:00
-
You can not handle menu events in one activity from another. Maybe you can use a floating (context menu) for the opengl even if it takes full screen.– dannyCommented May 20, 2012 at 1:27