Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the current android equivalent of UITabBar

There are many old questions here on the matter. And they all mention that the former mechanism is now deprecated. Is there a present means for created Tab based applications in android similar to how it's done in iOS, i.e. using UITabBar/UITabBarController?

like image 450
Katedral Pillon Avatar asked Jan 30 '26 03:01

Katedral Pillon


1 Answers

If you are using Android studio, you can use it to generate up-to-date code samples for tabs.


file > new > activity > Tabbed activity

Generates an activity with a tabbar at the top, and uses Fragments for the tabs.


file > new > activity > Bottom Navigation Activity

Tabbar at the bottom. You will have to implement the tabbing yourself, I would recommend using Fragments here as well. You can generate fragments using file > new > Fragment, and learn how to swap them at runtime: https://developer.android.com/training/basics/fragments/fragment-ui.html#AddAtRuntime

like image 51
Simon Epskamp Avatar answered Jan 31 '26 19:01

Simon Epskamp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!