What is the difference between Activity Title and Action Bar Title. Both seem to occupy same area
however activity title is set using
getActivity().setTitle("abc")
and Action Bar Title by
getActivity().getActionBar().setTitle("abc")
Well, there is a difference,
When setting the action bar's title using the setTitle method of class ActionBar will only be displayed if DISPLAY_SHOW_TITLE is set or action bar is present in the activity.
However, the setTitle method of Activity class can be used to set title even when there isn't any action bar for that window.
This really makes a difference when you are using a screen readers such as Talkback or developing an app for users with disabilities. It simply makes your app more accessible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With