This is a migrated thread and some comments may be shown as answers.

Tabbed View with Drawer

2 Answers 110 Views
Drawer (Mobile)
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 2
Gary asked on 20 Jan 2014, 08:41 AM
If possible, I'd like a tabstrip layout with a drawer that slides out from the left when you select one of the tabs.  Kind of have it working with something like the code below.   Before I go much further, is this possible with KendoUI?  I'm starting to see some apps do this (like Lowes Hardware app).  It's really nice.

<div data-role="layout" data-id="drawer-layout">
    <header data-role="header">
        <div data-role="navbar">
            <span data-role="view-title"></span>
        </div>
    </header>

    <div data-role="footer">
        <div data-role="tabstrip" data-selected-index="1" data-select="onSelect">
            <a data-icon="contacts">foo</a>
            <a data-icon="contacts">bar</a>
            <a data-icon="info">baz</a>
            <a data-icon="info">baz2</a>
            <a data-icon="info">baz4</a>
        </div>
    </div>    
</div>

<script>
  
   function onSelect(e) {
    
       if (e.item.index()==0)
       {
           $("#my-drawer").data("kendoMobileDrawer").show();
           e.preventDefault(); //prevent the tab selection
       }
   }
</script>

2 Answers, 1 is accepted

Sort by
0
Accepted
Petyo
Telerik team
answered on 21 Jan 2014, 09:19 AM
Hi Gary,

Yes, such pattern is possible. In fact, your implementation seems correct, and it should be working as expected.

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gary
Top achievements
Rank 2
answered on 27 Jan 2014, 02:10 AM
Thank you, it's working well so far.  The only issue was strange back-button behavior on Android.  I have to handle the back-button event to make it work.
Tags
Drawer (Mobile)
Asked by
Gary
Top achievements
Rank 2
Answers by
Petyo
Telerik team
Gary
Top achievements
Rank 2
Share this question
or