Titanium Android module that allows you to add a custom view to a BottomNavigation:
<module>ti.bottomNavView</module>
require("ti.bottomNavView").addViewToBottomNav(view, tabgroup);
<Alloy>
<TabGroup style="Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION" onOpen="onOpenTabs" id="tabgroup">
<Tab id="tab1" title="Home">
<Window />
</Tab>
<Tab id="tab2" title="Chat">
<Window />
</Tab>
<Tab id="tab3" title="Friends">
<Window />
</Tab>
<Tab id="tab4" title="">
<Window />
</Tab>
</TabGroup>
</Alloy>
function onOpenTabs(e) {
var v_outer = Ti.UI.createView({
touchEnabled: false
});
var v = Ti.UI.createView({
width: 40,
height: 40,
borderRadius: 20,
backgroundImage: "/images/appicon.jpg",
right: 20
});
v_outer.add(v);
require("ti.bottomNavView").addViewToBottomNav(v_outer, $.tabgroup);
}
$.tabgroup.open();
For a hyperloop version check tidev/titanium-sdk#13423
- Michael Gangolf (@MichaelGangolf / Web)