Android Question Common Controls in Multiple Panels

Orly Andico

Member
Licensed User
Longtime User
Hello,
I am trying to build an app which has multiple Layouts.

The plan is, each Layout goes into its own Panel, and I switch between Panels using Menu items (or could be a TabHost.. or some other means)

Now I have a set of buttons that I want to be visible in all Panels (a sort of D-pad).

What's the best way to implement this? I have the buttons in the Designer as a separate Layout, but the layout size is for a device so there's lots of black space around the D-pad buttons. This D-pad would only consume about half the screen at all times.

Also.. (more newbie-ish question) it seems that all controls have global scope? not on a per-Panel basis?
 

Attachments

  • blackspace.jpg
    blackspace.jpg
    83.3 KB · Views: 168

Orly Andico

Member
Licensed User
Longtime User
Or do I simply copy-paste the buttons into every Panel? I assume so long as the button names are constant, then this would not cause any namespace collisions? and the existing event handlers would work?
 
Upvote 0

derez

Expert
Licensed User
Longtime User
I would put all the buttons (one set of ) in a panel, and all the other panels will alternately be switched on on the area that is left.
Layouts can be set to panels, as well as to activity.
 
Upvote 0
Top