Android: What's the difference between a title

2020-06-08 06:54发布

I can't tell if they're the same thing or not and they seem to have different methods for removing them but I'm not sure if those are just multiple methods to do the same thing or not.

So is there a difference and if there is what is it?

Ref:

2条回答
再贱就再见
2楼-- · 2020-06-08 07:12

The Title bar is a small part of the UI that you can supply with some text and a color. You see it on a lot of Android 2.0 Apps. See here

The Actionbar is the bar with buttons that has back navigation etc. If you can chose, you use it instead of the Titlebar. See here

查看更多
趁早两清
3楼-- · 2020-06-08 07:27

Different thing.

TitleBar - small (usually grey) strip at top of screen that lists your Application Name (mostly not used anywhere)

ActionBar - the core navigation component of modern Android apps - this is where you will put the main navigation components (including actions on the things in your activity, a title explaining where you are in the app, Share links, etc); To support this in all modern Android versions, you will need to use a library to implement this. ActionBarSherlock is a very popular one, and there is now ActionBarCompat, which was released in the latest Support Library.

Bottom line, TitleBar should be disabled in favor of ActionBar for applications targeting modern design standards

查看更多
登录 后发表回答