Reputation: 1334
I need a List look like iphone menu, see this picture
My list actually is this
I can't obtain a same look
my js code
var store = new Ext.data.JsonStore({
model : 'Contact',
getGroupString : function(record) {
return record.get('menu')[0];
},
data: [
{menu: '<img src="images/summary2.png" height="42" width="42" /> Shipment Summary ',item:'1'},
{menu: '<img src="images/detail2.png" height="42" width="42" /> Shipment Details ',item:'2'},
{menu: '<img src="images/documents2.png" height="42" width="42" /> Shipment Documents ',item:'3'}
]
});
SL.views.mainMenuBottomBar = new Ext.List
({
id: 'MBB',
fullscreen: false,
centered: true,
cls: 'settingscls',
disableSelection: true,
scroll: false,
dock: 'bottom',
itemTpl : '<tpl for="."><div class="x-list-group-items">{menu}</div></tpl>',
grouped : false,
indexBar: false,
onItemDisclosure:
function(record)
{
if(record.get('item')=='1') {
}
...
},
store: store
});
my css code
.settingscls
{
background:transparent;
}
.settingscls .x-list-disclosure
{
margin-top:0.6em;
right:1em !important;
-webkit-mask:none;
-webkit-mask-box-image: url('images/list-arrow.png');
}
.settingscls .x-list-item
{
background:white;
left:10px;
right:10px;
bottom:10px;
-webkit-border-top-left-radius: 0.4em ;
-webkit-border-top-right-radius: 0.4em;
-webkit-border-bottom-left-radius: 0.4em;
-webkit-border-bottom-right-radius: 0.4em;
}
-In the css I can't apply border to first and last item list
-The text appears in vertical align bottom
-the font not same to iphone menu
-the right margin or padding works
Please help me
Thank you in advance!
Upvotes: 0
Views: 3584
Reputation: 835
Make sure you container has padding to the left and right, and that the ul is displayed as a block element, like so: http://jsfiddle.net/P9pSG/4/
Upvotes: 1
Reputation: 46405
Check out the similar question asked on Sencha Touch forum:-
Output :-
Upvotes: 3