Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27880] Android: Add animate parameter for disableTabNavigation

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsTabGroup, android, tab
ReporterMichael Gangolf
AssigneeJoshua Quick
Created2020-05-03T13:25:33.000+0000
Updated2021-02-22T18:42:27.000+0000

Description

Currently it is only possible to hide/show the BottomNavigationBar. It is not possible to animate it.
var win1 = Ti.UI.createWindow({backgroundColor: '#fff'});
win1.add(Ti.UI.createLabel({touchEnabled:false, text: 'Click to hide - animated'}));

var isOpen = true;

win1.addEventListener("click",function(){
	isOpen = !isOpen;
	tabGroup.disableTabNavigation(!isOpen, true); // animate navbar
})

var win2 = Ti.UI.createWindow({backgroundColor: '#fff'});
win2.add(Ti.UI.createLabel({touchEnabled:false,text: 'Click to hide'}));
win2.addEventListener("click",function(){
	isOpen = !isOpen;
	tabGroup.disableTabNavigation(!isOpen); // old behavior
})
var tab1 = Ti.UI.createTab({
    window: win1,
    title: 'Blue'
}),
tab2 = Ti.UI.createTab({
    window: win2,
    title: 'Red'
}),
tabGroup = Ti.UI.createTabGroup({
	style: Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION,
    tabs: [tab1, tab2]
});
tabGroup.open();
A second optional parameter is used to animate it !ezgif-3-c99e7f591a6d.gif!

Attachments

FileDateSize
ezgif-3-c99e7f591a6d.gif2020-05-03T13:25:06.000+0000402114

Comments

  1. Michael Gangolf 2020-05-03

    PR: https://github.com/appcelerator/titanium_mobile/pull/11681

JSON Source