-
18 Aug 2010 4:40 AM #1
Carousels inside items of a tabbar?
Carousels inside items of a tabbar?
Hi there,
I'm trying to create a user interface in which you navigate with a TapBar at the bottom of the screen. When you click a tab in this bar, you will be redirected to a "page" (item of the TabBar). In this page I'd like to show a Carousel. The TabBar should remain at the bottom of the screen. The Carousel fills the space above it.
This is what I came up with (and does not work
):
Any help would be appreciated. Please be gentle, I'm just starting to use Sencha Touch...Code:Ext.setup({ tabletStartupScreen: "images/tablet_startup.png", icon: "images/icon.png", glossOnIcon: true, onReady: function() { // BUILD CAROUSEL (SHOWN INSIDE TABPANEL) var carousel = new Ext.Carousel({ ui: "light", items: [{ html : "<h1>Slide 1</h1>" }, { html : "<h1>Slide 2</h1>" }, { html : "<h1>Slide 3</h1>" }, { html : "<h1>Slide 4</h1>" }] }); // BUILD MAIN NAVIGATION var navigation = new Ext.TabPanel({ items : [{ iconCls : 'bookmarks', title : 'home', contentEl : carousel },{ iconCls : 'info', title : 'print', html : 'replace this with contentEl' }], tabBar: { dock: 'bottom', scroll: { direction: 'horizontal', scrollbars: false }, layout: { pack: 'center' } } }); // BUILD MAIN STRUCTURE new Ext.Panel({ fullscreen: true, layout: { type: 'vbox', align: 'stretch' }, defaults: { flex: 1 }, items: [navigation] }); } });
-
18 Aug 2010 6:27 PM #2
You want something more like this:
Code:Ext.setup({ tabletStartupScreen: "images/tablet_startup.png", icon: "images/icon.png", glossOnIcon: true, onReady: function(){ // BUILD CAROUSEL (SHOWN INSIDE TABPANEL) var carousel = new Ext.Carousel({ iconCls: 'bookmarks', title: 'home', ui: "light", items: [{ html: "<h1>Slide 1</h1>" }, { html: "<h1>Slide 2</h1>" }, { html: "<h1>Slide 3</h1>" }, { html: "<h1>Slide 4</h1>" }] }); // BUILD MAIN NAVIGATION var navigation = new Ext.TabPanel({ fullscreen: true, items: [carousel, { iconCls: 'info', title: 'print', html: 'replace this with contentEl' }], tabBar: { dock: 'bottom', scroll: { direction: 'horizontal', scrollbars: false }, layout: { pack: 'center' } } }); } });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
18 Aug 2010 9:18 PM #3
This was very helpful
This was very helpful
Hi Evant,
Thanx for the help... this is exactly what I was trying to do. Keep up the good work with Sencha (Touch).
Grt,
Edwart
-
19 Aug 2010 2:28 AM #4
what if i have a carousel and there are links in one "page" and i want to deeplink to a page from page 1..?
-
19 Aug 2010 5:11 AM #5
-
1 May 2012 8:05 AM #6
Has anyone tried this in Sencha Touch 2.0?
Has anyone tried this in Sencha Touch 2.0?
Has anyone done this in Sencha Touch 2.0? Does anyone have some artikel which i general explains what and how to port stuff from Sencha Touch 1.0 to 2.0?
Similar Threads
-
set width of items in tabbar
By peeyush81 in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 10 Sep 2010, 3:00 PM -
How to display tabBar {dock:top} in TabPanel style with icons as tabBar {dock:bottom}
By kostik83 in forum Sencha Touch 1.x: DiscussionReplies: 2Last Post: 30 Jul 2010, 6:50 PM -
How to align items inside an fbar in ext 3.0?
By elishnevsky in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 24 Apr 2009, 7:54 AM -
2 items inside a container with fit layout
By mysticav in forum Ext 2.x: Help & DiscussionReplies: 12Last Post: 8 Nov 2008, 1:26 AM -
CheckBox items inside a ComboBox
By gounis in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 8 Jan 2008, 8:39 AM


Reply With Quote