How can i create a dashboard(Titanium.UI.createDashboardView) Like cross button. Actually i dont know how to position it top-left or top right like dashboard. Please help ..
2 Answers
What do you mean "cross button?"
You can use a standard view (Ti.UI.createView) created as a child element of a larger view, and then listen for the click event on the child view, if you'd like. For instance:
// This makes the holder. You can add a background image/etc. to this view var holder = Ti.UI.createView({ top: 0, bottom: 0, left: 0, right: 0 }); // This would be a menu item. var button = Ti.UI.createView({ top: 10, left: 10, width: 100, height: 100, backgroundColor: "#0000FF" }); // Here is where the click is registered button.addEventListener("click",function(eventObject){ // Do stuff here }); holder.add(button);You would then need to add the holder to your main window. Hope this helps!
Hello Gaurav,
See this LINK
Your Answer
Think you can help? Login to answer this question!