css - 如何在 Titanium Android 模拟器中使用 css 解析 TableView

标签 css titanium titanium-mobile titanium-alloy

如下所示的 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/

相关文章:

android - 日期选择器和时间选择器模式对话框不显示设置和取消按钮

objective-c - Titanium 上的文档交互 Controller

titanium-mobile - libpng 警告 : iCCP: Not recognizing known sRGB profile that has been edited

javascript - 钛金应用程序中的Unicode字符 'BULLET'

html - Firefox 56 使用任何自定义字体截断文本

css - 如何将 CSS 导航栏元素移动到右侧?

android - 如何在 php 中适应每个不同分辨率的屏幕?

html - 无法在浏览器中显示希腊字母

javascript - 无法将数据列表添加到合金钛的 tableRow 中

ios - 如何在iPhone 6和6 Plus模拟器中启动使用Titanium构建的iOS应用?