2014-03-06 47 views
0

xsml文件如下,它在Web瀏覽器中顯示良好,但在Android模擬器中不顯示。如何在Titanium中使用css解析TableView 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是在窗口成功,但實現代碼如下數據應用中的Andriod沒有顯示模擬器事件在Web瀏覽器中顯示良好。有什麼可以解決的問題請幫忙

回答

0

有點舊帖子,但我想我會加2美分。首先,我們無法測試此代碼,因爲我們沒有參考圖像。其次,通過將此行添加到您的tiapp.xml <property name="ti.ui.defaultunit" type="string">dp</property>中,刪除代碼中的所有dp引用。最後,解釋你已經嘗試了什麼,以及你想要完成什麼。您的文章缺少大量的信息,可以讓其他人幫助您。

相關問題