Android, Reusable Toolbar For Navigation - Where To Put Code?
I want to implement a toolbar for navigation which appears at the bottom of almost all activities in my app. It will have a fixed amout of elements (four). Screenshot: (certain a
Solution 1:
Make A Base activity, which will be extending by all your other activities. Write all your logic related to that toolbar on Base Activity. Thats all.
Solution 2:
You could use the TabLayout
with ViewPager
. Place them in main Activity
, and use Fragment
for every root screen.
Post a Comment for "Android, Reusable Toolbar For Navigation - Where To Put Code?"