[AC-6192] SDK 8.0.0 Android - ActionBar.hide() shows anyway Tabs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-04-03T16:44:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | actionbar,, android,, sek-8.0.0, tabgroup, |
Reporter | Antje Schattat |
Assignee | Shak Hossain |
Created | 2019-04-02T09:16:18.000+0000 |
Updated | 2019-04-03T16:52:07.000+0000 |
Description
Starting with SDK 8.0.0, using the actionBar.hide () will no longer hide the tabs. I am developing an app that requires this. Is this a mistake? Or is there a new function to hide the tabs (TabGroup)?
This is not a bug. It was an intentional breaking-change in Titanium 8.0.0. What you need to do instead is call the [TabGroup.disableTabNavigation()](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-method-disableTabNavigation) method. This will hide the tabs in Titanium 8.0.0 and older versions as well. Regarding the 8.0.0
TabGroup
breaking-change... Displaying tabs via theActionBar
was deprecated by Google back in Android 5.0. The modern way to do it is via Google's [TabLayout](https://developer.android.com/reference/android/support/design/widget/TabLayout) and [BottomNavigationView](https://developer.android.com/reference/android/support/design/widget/BottomNavigationView) Java classes which is what Titanium uses now. The benefits of this change is: * You can now use a "NoTitleBar" theme in aTabGroup
. (ie: NoActionBar
.) * Bottom tabs are now supported. The negative effect of this change is that the top tabs no longer appear in theActionBar
when in landscape orientation. But you are now able to remove/hide theActionBar
anyways and preserve the tabs, which is a feature many app developers were after anyways. I hope this helps.Thank you for the quick help. It works. I've already thought something like that, I have unfortunately overlooked it in the documentary. And thanks for the hint with the BottomNavigationView.
Happy to help! And you can put the tabs on the bottom via
TabGroup
property "style". https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-style