titanium开发教程-04-10移动rows
生活随笔
收集整理的這篇文章主要介紹了
titanium开发教程-04-10移动rows
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
android無法運行
?
// this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000');// create tab group var tabGroup = Titanium.UI.createTabGroup();var win = Titanium.UI.createWindow({ title:"Main Window",backgroundColor:"#FFFFFF",//navBarHidden:true, //Hide the nav bar for the windowtabBarHidden:true //Hide the tab bar for the window }); var tab = Titanium.UI.createTab({ icon:"KS_nav_views.png",title:"Main Tab",window:win });var data = [{title:"Backpack Cal", leftImage:"images/01-backpack-cal-thumb.png", className:"tableRow", hasCheck:true},{title:"California Calm", leftImage:"images/02-calm-cal-thumb.png", className:"tableRow", hasDetail:true},{title:"California Hotsprings", leftImage:"images/03-hotsprings-cal-thumb.png", className:"tableRow", hasChild:true},{title:"Cycle California", leftImage:"images/04-cycle-cal-thumb.png", className:"tableRow"},{title:"From Desert to Sea", leftImage:"images/05-desert-cal-thumb.png", className:"tableRow"},{title:"Kids California", leftImage:"images/06-kids-cal-thumb.png", className:"tableRow"},{title:"Nature Watch", leftImage:"images/07-nature-watch-cal-thumb.png", className:"tableRow"},{title:"Snowboard Cali", leftImage:"images/08-snowboard-cal-thumb.png", className:"tableRow"},{title:"Taste of California", leftImage:"images/09-taste-cal-thumb.png", className:"tableRow"} ]var tableView = Titanium.UI.createTableView({data:data,editable:true,allowsSelectionDuringEditing:true});//Tap a row to delete it tableView.addEventListener("click",function(e){//Switch between the editing and non-editing modeif(!tableView.editing){tableView.editing = true;}else{tableView.editing = false;}})//Restore the row; exit editing mode tableView.addEventListener("delete",function(e){tableView.editing = false;//Show the index of the row after it has been movedalert(e.index); })win.add(tableView);tabGroup.addTab(tab); // open tab group tabGroup.open();轉載于:https://www.cnblogs.com/xiaozhanga4/archive/2012/03/17/2403319.html
總結
以上是生活随笔為你收集整理的titanium开发教程-04-10移动rows的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Selenium自动化获取WebSock
- 下一篇: 使用编辑工具快速创建实体对象的方法