It works on iOS but not on Andorid. The images are not show up on android. I can't figure out what's going on here!
Code:
Ext.define('Test.view.Feed', {
extend: 'Ext.Container',
xtype: 'feed',
requires: [
'Ext.Label',
'Ext.dataview.List'
],
initialize: function(){
this.items.items[0].setHtml(this.config.title)
this.callParent()
},
config: {
items:[{
xtype: 'label'
},
{
xtype: 'dataview',
cls: Ext.baseCSSPrefix + 'feed',
itemCls: Ext.baseCSSPrefix + 'feed-item',
data: [
{username:'aa',src:'http://res.cloudinary.com/hy2jntlyv/image/upload/v1482164023/msdctybsj198jh0tfb5p.jpg'},
{username:'bb',src:'http://res.cloudinary.com/hy2jntlyv/image/upload/v1479932189/ikqbp38nihucscsx8dli.jpg'},
{username:'cc',src:'http://res.cloudinary.com/hy2jntlyv/image/upload/v1492891684/luxxxew4fzkwsmdbhflm.jpg'}
],
itemTpl: new Ext.XTemplate("<div class='preview'><img class='preview-user-img' src='{src}' style='display:inline'/><p class='preview-user-name'>{username}</p></div>"),
inline: {wrap: false},
scrollable: 'horizontal'
},
{
xtype:'video',
cls: Ext.baseCSSPrefix + 'feed-item-video',
posterUrl:'http://res.cloudinary.com/hy2jntlyv/video/upload/v1493949147/cznyh7vbhbuxluyhsvzg.jpg',
url:['http://res.cloudinary.com/hy2jntlyv/video/upload/v1493949147/cznyh7vbhbuxluyhsvzg.mp4'],
width:'100%',
height:'350px'
}
]
}
/*template: [{
}],*/
});
Code:
.x-feed {
margin-top:15px;
height:100px;
}
//feed item style
.x-feed-item{
}
.x-feed-item .preview{
margin-right:10px;
}
.x-feed-item .preview-user-img{
width:64px;
height:64px;
object-fit:cover;
border-radius:50%;
border:1px solid #eee;
}
.x-feed-item .preview-user-name{
text-overflow: clip;
text-align:center;
font-size:10px;
font-color:#777;
}
.x-feed-item-video{
margin-bottom:30px;
border-radius:6px;
}
.x-feed-item-video .x-video-ghost{
border-radius:6px;
}