【发布时间】:2014-02-15 08:16:27
【问题描述】:
我一直在用sencha touch 2 开发一个android 应用程序。当前天气和每日预报是用html 类型构建的。我希望每小时预测将显示在水平滚动面板中,所以我不得不使用 DataView 类型 (http://docs.sencha.com/touch/2.3.0/#!/api/Ext.dataview.DataView)
很遗憾,我无法让它在 Android 模拟器中运行。请看下面的截图,看看模拟器和 chrome 之间的区别。我也没有在 ADT 和 chrome 控制台日志中看到任何错误。
http://i.stack.imgur.com/Mxzrt.png
这是我的源代码,这些项目位于旋转木马的卡片内。感谢您花时间阅读我的问题。
items: [{
height: '50%',
html: tplCurr.apply(obj)
}, {
height: '10%',
xtype: 'dataview',
cls: 'hourly-container',
scrollable: {
direction: 'horizontal',
directionLock : true
},
inline: { wrap: false },
data: obj.hourly,
itemTpl: tplHourly
}, {
height: '40%',
xtype: 'panel',
cls: 'daily-container',
fullscreen: true,
scrollable: {
direction: 'vertical',
directionLock : true
},
items: dayItems
}]
【问题讨论】:
-
如果您可以发布父容器的代码或至少发布布局属性会很有帮助。您是否使用“vbox”进行布局?尝试在每个容器上使用 flex 属性而不是高度(例如 flex:5、flex:1、flex:4)
标签: android-emulator sencha-touch-2 dataview invisible