Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6192] SDK 8.0.0 Android - ActionBar.hide() shows anyway Tabs

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2019-04-03T16:44:03.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsactionbar,, android,, sek-8.0.0, tabgroup,
ReporterAntje Schattat
AssigneeShak Hossain
Created2019-04-02T09:16:18.000+0000
Updated2019-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)?

Comments

  1. Joshua Quick 2019-04-02

    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 the ActionBar 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 a TabGroup. (ie: No ActionBar.) * Bottom tabs are now supported. The negative effect of this change is that the top tabs no longer appear in the ActionBar when in landscape orientation. But you are now able to remove/hide the ActionBar anyways and preserve the tabs, which is a feature many app developers were after anyways. I hope this helps.
  2. Antje Schattat 2019-04-03

    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.
  3. Joshua Quick 2019-04-03

    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

JSON Source