-1

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 1

0

You can use TabActivity to switch between two different activities.

3
  • TabActivity is deprecated. It is encouraged to use the Android Support Package to implement tabs within an Activity. 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.
    – danny
    Commented May 20, 2012 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.