简体   繁体   中英

Sencha Touch: how to add a table view as rootView in left side & a view with a button as detailsView in right side of this split view in sencha touch

I have implemented an app in iphone using sencha touch & phone gap .

Implemented split view using following code in index.js in SRC file with two text messages.. as shown bellow figure

Now i need to add a table view on left side root view and a button on right side details view. how?

Thanks in advance

Ext.ns('sink', 'demos', 'Ext.ux');
Ext.ux.UniversalUI = Ext.extend(Ext.Panel,
                                {
                                  fullscreen: true,
                                  layout: 'hbox',
                                  items:

                                  [
                                     //Root view 
                                     {
                                       xtype: 'panel',
                                       html: 'TableView/Rootview goes here ...',
                                       flex: 1
                                   },

                                    //Details view
                                   {
                                       xtype: 'panel',
                                        html: 'Message Detail view goes here ....',
                                       flex: 2
                                   }
                                  ]

                                });

在此处输入图片说明

Currently your rootView and detailView are all of xtype: 'panel' . To achieve what you need, you have to modify a little bit to those 2 items:

 { xtype: 'container', items: [ {xtype: 'button', text: 'my button'}, {xtype: 'panel', text: 'detail panel'}. ] } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM