I'm making an android app using onsen-ui 2 for front-end. I'll be displaying multiple categories via tabs on one page.Since there are around 7 categories, I want to implement scrollable tab-bar like in native android apps. So, basically how to do something like scrollable tab-bar using onsen-ui 2. For now I think its not built-in. I want to implement something like this:
https://i.stack.imgur.com/zjILk.png
I did try using materialize css but it doesn't work perfectly.It increases the width of the page and breaks the responsive view.
Update: I set these CSS properties to get extended view:
` .tab-bar{
display: block;
table-layout: none;
width:200%; //this is the problem now...
}`
along with this I added custom jquery.kinetic library to get touch scrolling from here: http://davetayls.me/jquery.kinetic/
and initialized to ons-tabbar like this:
<ons-tabbar modifier="material" id="tab"> //in HTML
$(document).ready(function(){
$("#tab").kinetic();
});
Scrollable tabbar works fine. but if the width of tab-bar class is too big,there are white spaces at the end. Is there any way to overcome this? One answer I thought was CSS media queries but tabs are being added dynamically.So, they might go above 7 in the future.Any help will be appreciated.