Android: many activities on single screen?
-
28-10-2019 - |
题
I'm creating my first app for Android device and I was faced with a challenge... I want to create fixed bottom bar on every screen of my application (something similar to bars from tunein radio).
However I do not know how to make bars which are fixed on every activity (bar do not load when new activity is loaded but is permanent on every app screen). I do not want to <include>
my bars in every activity (I've tried this solution but my bars were loading with activity).
Is it possible that this is Activitygroup and only middle activity is changing? If so how can I do that?
PS. What book or tutorial do you recommend ;-)?
tunein radio bottom and top bar image #1
解决方案
Use fragments api. It perfectly fits your needs.
其他提示
Look at ViewFlipper. It lets you manage multiple views. You'd have one activity that would watch your button bar and flip views in response to buttons.