Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Creating a custom interface

Using TI 1.6 and everything is running perfectly. Created a new project, modified the default tab layout, and running as expected on a physical device.

But, I get errors when running a simple application developed from scratch (i.e. a blank app.js file).

For example, Isn't it as simple as? :

var window1 = Titanium.UI.createWindow({
backgroundColor:'red'
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am a Window',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
window1.add(label1);
window1.open({fullscreen:true});

What am I missing?

Thanks!

— asked May 10th 2010 by Art Sosa
0 Comments

3 Answers

  • Your code works as is when I paste it into a new project. What's the behavior you're seeing?

    — answered May 10th 2010 by Kevin Whinnery
    permalink
    0 Comments
  • Hello Kevin,

    I get the following alert on the simulator: "Sorry! - The application … has been stopped unexpectedly. please try again.".

    No real reason.

    I compiling using Android SDK 1.6, TI 1.3.0.

    Thoughts?

    Thanks for the assistance.

    — answered May 10th 2010 by Art Sosa
    permalink
    0 Comments
  • If anyone is experiencing the same issue!

    I installed the latest nightly build and it fixed the problem. Here's the name of the file - mobilesdk-1.3.0-20100510171507-android-win32

    You can download it at http://drop.io/titanium_android_nightly

    Hope this helps…

    Art

    — answered May 10th 2010 by Art Sosa
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.