如下所示的 xsml 文件在网络浏览器中显示良好,但在 Android 模拟器中不显示。
<Alloy >
<Window id="readWin" class="bg">
<TableView id="tableView">
<TableViewRow class="titlebar"></TableViewRow>
<TableViewRow></TableViewRow>
<TableViewRow>
<TextField class="serachbar"></TextField>
</TableViewRow>
<TableViewRow></TableViewRow>
<TableViewRow center="center" width="190" height="63">
<Button class="sbtn" id="subbtn"></Button>
</TableViewRow>
</TableView>
</Window>
</Alloy>
我的 index.tss 代码是这样的
'#tableView':{
separatorColor:'none'
}
"View":{
layout:'vertical',
},
".bg":{
backgroundImage:'images/bg.png',
},
".titlebar":{
backgroundImage:'images/logo.png',
width:'339dp',
height:'71dp',
top:'140dp'
},
'.serachbar':{
backgroundImage:'images/searchbar.png',
width:'400dp',
height:'50dp',
borderStyle:'none',
},
'.sbtn':{
backgroundImage:'images/btn.png',
width:'187dp',
height:'60dp',
borderStyle:'none',
}
我的index.js文件代码是
$.readWin.open();
bg css 成功应用于窗口,但 tableview 数据未在 Andriod Emulator 事件中显示其在 Web 浏览器中的良好显示。可能是什么问题请帮助
最佳答案
有点旧的帖子,但我想我应该加 2 美分。首先,我们无法测试此代码,因为我们没有引用图像。其次,删除所有dp
通过将此行添加到您的 tiapp.xml <property name="ti.ui.defaultunit" type="string">dp</property>
来引用您的代码.最后,解释你已经尝试过什么,以及你想要完成什么。您的帖子缺少大量信息,无法让其他人为您提供帮助。
关于css - 如何在 Titanium Android 模拟器中使用 css 解析 TableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22227252/