[TIMOB-27880] Android: Add animate parameter for disableTabNavigation
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | TabGroup, android, tab |
Reporter | Michael Gangolf |
Assignee | Joshua Quick |
Created | 2020-05-03T13:25:33.000+0000 |
Updated | 2021-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
File | Date | Size |
---|---|---|
ezgif-3-c99e7f591a6d.gif | 2020-05-03T13:25:06.000+0000 | 402114 |
PR: https://github.com/appcelerator/titanium_mobile/pull/11681