钛:导航从一个屏幕到另一个 [英] Titanium: navigation from one screen to other

查看:161
本文介绍了钛:导航从一个屏幕到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我按一下按钮,我想导航到另一个屏幕。我怎么会在二实现这一目标?

  VAR TrialButton = Titanium.UI.createButton({
    颜色:黑,
    的backgroundColor:#FFFFFF,
    标题:审判模​​式,
    顶:55,
    宽度:300,
    高度:50,
    borderRadius:5,
    字体:【字体:18,fontFamily中:黑体,fontWeight设置:'大胆'}
});



 TrialButton.addEventListener('点击',函数(){
  VAR newWindow = Titanium.UI.createWindow({
      背景:#FFF
      标题:审判演示,
      网址:nextScreen.js
  });
  newWindow.open();
});
 

解决方案

  TrialButton.addEventListener('点击',函数()
 {
    VAR newWindow = Ti.UI.createWindow({
        背景:#000,
        标题:图片浏览,
        网址:nextScreen.js
    });
    newWindow.open();
 )};
 

应该结帐的例子在这里 https://github.com/appcelerator/KitchenSink

下面是从我的博客 http://blog.clearlyinnovative.com/tagged/Appcelerator

On the click of my button, I want to navigate to another screen. How would I achieve this in Titanium?

var TrialButton = Titanium.UI.createButton({
    color:'black',
    backgroundColor:'#FFFFFF',
    title:'Trial Mode',
    top:55,
    width:300,
    height:50,
    borderRadius:5,
    font:{fontSize:18, fontFamily :'Helvetica', fontWeight:'bold'}
});



 TrialButton.addEventListener('click', function() {    
  var newWindow = Titanium.UI.createWindow({ 
      background : "#fff",
      title : "Trial Demo",           
      url:"nextScreen.js"    
  });    
  newWindow.open();              
});

解决方案

 TrialButton.addEventListener('click', function()
 {
    var newWindow = Ti.UI.createWindow({
        background : "#000",
        title : "Image View",
        url:"nextScreen.js"
    });
    newWindow.open();             
 )};

should checkout examples here https://github.com/appcelerator/KitchenSink

here are some posts from my blog http://blog.clearlyinnovative.com/tagged/Appcelerator

这篇关于钛:导航从一个屏幕到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆