Retain button panel between activities

sconlon

Active Member
Licensed User
Longtime User
I'm writing an App that will have a number of tabs/buttons at the bottom of the screen to perform separate functions. I wanted to retain this button panel when switching between the functions but this does not seem possible if I code each function in a separate activity. When each activity starts and I load the relevant layout the existing button panel is overwritten, so I would have to reload it within each activity.

So, other than code the whole lot in one activity (Main) is there any other way in which I can retain the button panel when switching between multiple activities or is there some entirely different approach that could achieve this?
 

sconlon

Active Member
Licensed User
Longtime User
Thanks for the suggestion but I very little knowledge of Java and classes so I don't think I would be able to do it that way.
 
Upvote 0

sconlon

Active Member
Licensed User
Longtime User
Any idea where I might find it? I have searched this and other forums and found nothing that looks like the thing you are referring to.
 
Upvote 0

sconlon

Active Member
Licensed User
Longtime User
Sorry, I misunderstood the suggestion. But I'm still not sure if that will achieve what I want. For example, I load the main layout which has a height of 90%y and then load the button panel into the bottom 10%y. The user then taps one of the buttons which starts a new activity that loads its own layout but this also requires a reload of the button panel, at least that's what seems to happen in my tests so far. What I need is for the second activity to load its layout and leave the button panel intact and visible.

I hope that explains better what I want to do!
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
Here's a class provided by Erel, the tableView. It's not what you're looking for, but it should give you what you need to know, in order to builg your very own class for the purpose you need. Just follow the code :)
 
Upvote 0

sconlon

Active Member
Licensed User
Longtime User
I understand Erel's class ok but I still don't see how it will provide a solution. The problem (or at least my understanding of it) is that when you switch between activities the layout from the previous activity, in my case the button panel, is no longer 'displayed' and visible so the new activity needs to reload it, which doesn't give a smooth transition as the switch is plainly visible on the screen. It's really a UI appearance issue and the code to handle the button panel events is not the issue .
 
Upvote 0
Top