I just started next mobile project. Application is targeted on both main mobile platforms: IOS and android. I know Objective-C and IOS Development methodology. Additionaly I spend over 10 last years on java development and android platform is known to me too. But I don’t want to programming one applications two times. :)

After few days’ research I decided to do it with Titanium Appcelerator. Titanium has big advantange againts other multiplatform tools. In Titanium we code with javascript and then its changed to native code. In frameworks like Phonegap we code with javascript too, but all code is displayed within basic WebView. It’s nothing more than displaying html5+CSS+JS code within native wrapper.

Appcelerator in last version (v3.0) introduced new framework named Alloy (don’t confuse this with Liferay’s Alloy Framework). Alloy is based on MVC architecture. It don’t use only javascript, but views are in XML sytax, styles are in JSON like syntax and all other code is in javascript. There are few nice features like widgets, reusable code platform specific code in another file, and so on.

I’ve decided to use it.
After few minutes I’ve met first problem. I tryied to show basic Window object with title – sadly with no effect.

I used this basic code to do this:

I think the code above is self explanatory, I created Window with title „Window’s Title”. Inside I put simple label with some text.

The effect was surprising:

)

I was checked one more time Titanium’s documentation and just acknowledged that „title” attribute is responsible for displaying Title bar with text. Why isn’t it diplayed then?

Is it bug or the feature?

After some research I found solution.
We need wrap our Window object by TabGroup and put all code in first tab. Additionally we should hide tabs. Thats the plan! :)

And this is effect:


.