<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2775741392389922276</id><updated>2024-11-01T03:35:40.998-07:00</updated><category term="Alloy"/><category term="titanium"/><category term="alloy framework"/><category term="model"/><category term="sqlite"/><category term="Alloy JSON object Sort by Date"/><category term="Android Module"/><category term="Modules"/><category term="display in tableview"/><category term="Album creation"/><category term="Alloy Migration"/><category term="Animation"/><category term="Framwork"/><category term="Garbage Collector"/><category term="Loading Remote JPG images in Android"/><category term="Photo sharing"/><category term="Pinterest Module"/><category term="RSS Feed Reader"/><category term="Titanium Inroduction"/><category term="builtin library"/><category term="chain animation"/><category term="collection"/><category term="createTable"/><category term="crossfade"/><category term="database"/><category term="db"/><category term="error Loading Remote JPG images"/><category term="example"/><category term="fadeAndRemove"/><category term="fadeout"/><category term="fadin"/><category term="flash"/><category term="get tweets using json"/><category term="insert values"/><category term="picture gallery"/><category term="popIn"/><category term="preloaded"/><category term="shake"/><category term="sort json array of objects"/><category term="tableview"/><category term="thumbnail view in scrollview"/><category term="titaniumm"/><category term="tutorial"/><category term="tweets in tableview"/><category term="tweets search"/><category term="twitter search in titanium"/><title type='text'>Titanium MobileApplication Development</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-4205086839373832067</id><published>2013-10-16T04:52:00.001-07:00</published><updated>2013-10-16T04:52:25.464-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="alloy framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Alloy Migration"/><category scheme="http://www.blogger.com/atom/ns#" term="model"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlite"/><title type='text'>Titanium Alloy - Migration with Model Tutorial</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi Friends,&lt;br /&gt;
&lt;br /&gt;
I am busy with my work. Here I am going to write post about &lt;b&gt;&quot;Migration&quot;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;What is Migration?&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;A migration is a description of incremental changes to a database, which takes your database from version 1 to version X, with a migration file for each step in the evolution of your database schema. This is helpful to keep different versions of a database in sync. For example, when version 7 of your application is deployed, migrations are able to successfully update the database from versions 1 through 6.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;Where I put migration files in my Titanium project?&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; In Alloy, migrations are defined by JavaScript files located in the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;app/migrations&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;folder of the project.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;Is there is any naming conversion require for migration files?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Yes,&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;The file should be named the same as the model JavaScript file prefixed with &#39;YYYYMMDDHHmmss_&#39; (datetime code followed by an underscore), for example,&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;20120610049877_movies.js&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;(**your model file name should be movies.js). Alloy applies the migrations from oldest to newest, according to the datetime code at the beginning of the file name.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;What are the functions used in migration files for upgrade my db?&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;The migration file contains two functions that need to be implemented : &lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;&lt;i&gt;migration.up(migrator&lt;/i&gt;&lt;/tt&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;&lt;i&gt;)&lt;/i&gt;&amp;nbsp;&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;&lt;i&gt;migration.down(migrator)&lt;/i&gt;&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;, where&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;&lt;i&gt;migrator&lt;/i&gt;&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;is a special migration object that provides references to the database and table as well as some convenient functions for table operations (see table below). The&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;migration.up&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;function upgrades the database from the previous version, while the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;migration.down&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;function rolls back the changes to the previous version.&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Is migration supports all type of adapters?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;Currently, migrations are only used with the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot; &quot; style=&quot;background-color: white; box-sizing: border-box; color: #484848; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 13px;&quot;&gt;sql&lt;/tt&gt;&lt;span style=&quot;background-color: white; color: #484848; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;sync adapter.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example Project:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;/b&gt;In this tutorial i am creating simple project you can download source code from following github repository. &amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://github.com/prakashmcam/AlloyMigrationExample&quot; target=&quot;_blank&quot;&gt;AlloyMigrationExample&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
1. Create simple Alloy project&lt;br /&gt;
2. Put you preloaded sqlite db file into &lt;i&gt;asset &lt;/i&gt;folder.&lt;br /&gt;
3. My sqlite db name is &quot;&lt;i&gt;sampledb.sqlite&quot;&amp;nbsp;&lt;/i&gt;and the db has &quot;&lt;i&gt;user_accounts&lt;/i&gt;&quot;&lt;i&gt;&amp;nbsp; &lt;/i&gt;table with some preloaded data&lt;br /&gt;
&lt;br /&gt;
We are going to add migration files for add a new table &quot;movies&quot; and insert the preloaded data.&lt;br /&gt;
&lt;br /&gt;
4. In Titanium Studio, Right click on the project --&amp;gt; New --&amp;gt; Alloy Migration --&amp;gt;Enter your migration table name. (No need to add timedate , Titanium Studio add this for you). In this example we enter &quot;movies&quot;. Now you can see migration file in &lt;i&gt;app/migrations/20130812093432_movies.js. &amp;nbsp;&lt;/i&gt;(Timedate string will be different ignore it. You can edit timedate string as per your need).&lt;br /&gt;
&lt;br /&gt;
5. Open the&amp;nbsp;&lt;i&gt;20130812093432_movies.js. &lt;/i&gt;file and you can see two function called &lt;i&gt;migration.up&lt;/i&gt; and &lt;i&gt;migration.down. &lt;/i&gt;&amp;nbsp;Modify code as follow,&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
migration.up = function(migrator) {
 migrator.createTable({
  columns: {
   id: &#39;INTEGER PRIMARY KEY AUTOINCREMENT&#39;,
   title: &#39;TEXT&#39;,
   subtitle: &#39;TEXT&#39;,
   image: &#39;TEXT&#39;
  }
 });
};

migration.down = function(migrator) {
 migrator.dropTable(&quot;movies&quot;);
};

&lt;/pre&gt;
&lt;br /&gt;
6.&lt;b&gt; migrator.createTable() function&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;This method used to create table at run time and added into database.&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;i&gt;columns: &lt;/i&gt;In this field you can define your table columns with type.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;7. Create Another migrator file for insert the preloaded data in movies table.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Repeat the Step 4. (Exactly same). Finally you get new migrator file with different time date string.&lt;/li&gt;
&lt;li&gt;Which means older get executed first.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;we get&amp;nbsp;&lt;i&gt;201308120941308_movies.js &amp;nbsp;, &lt;/i&gt;new migration file open this file and modify it.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var products = [];
for (var i = 0; i &amp;lt; 500; i++) {
 if (i%7 === 0) {
  products.push({
   title: &#39;This is the title&#39;,
   subtitle: &#39;This is the slightly more verbose subtitle&#39;,
   image: i%2 ? &#39;/appc.png&#39; : &#39;/alloy.png&#39;
  });
 } else if (i%2) {
  products.push({
   title: &#39;This is the title with subtitle&#39;,
   subtitle: &#39;This is the slightly more verbose subtitle&#39;
  });
 } else {
  products.push({
   title: &#39;This is the lonely title&#39;
  });
 }
}

migration.up = function(migrator) {
 for (var i = 0; i &amp;lt; products.length; i++) {
  migrator.insertRow(products[i]);
 }
};

migration.down = function(migrator) {
 for (var i = 0; i &amp;lt; products.length; i++) {
  migrator.deleteRow(products[i]);
 }
};

&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;8. Create model file for movies&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; Right click on project --&amp;gt; New --&amp;gt; Alloy Model --&amp;gt; Enter Model Name &quot;movies&quot;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; &amp;nbsp; Modify the app/Model/movies.js&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;exports.definition = {
 config: {
  columns: {
   id: &#39;INTEGER PRIMARY KEY AUTOINCREMENT&#39;,
   title: &#39;TEXT&#39;,
   subtitle: &#39;TEXT&#39;,
   image: &#39;TEXT&#39;
  },
  
  adapter: {
   type: &quot;sql&quot;,
   collection_name: &quot;movies&quot;,
   idAttribute: &#39;id&#39;,
  }
 }
}; 
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Now you can use this model same as other models used in Alloy. You can download working example from github. &amp;nbsp;Download full working example source code from &lt;a href=&quot;https://github.com/prakashmcam/AlloyMigrationExample&quot; target=&quot;_blank&quot;&gt;AlloyMigrationExample&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/4205086839373832067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/10/titanium-alloy-migration-with-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/4205086839373832067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/4205086839373832067'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/10/titanium-alloy-migration-with-model.html' title='Titanium Alloy - Migration with Model Tutorial'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-8268086796360900943</id><published>2013-08-29T07:16:00.002-07:00</published><updated>2013-08-29T07:16:45.070-07:00</updated><title type='text'>Android Native Controls Module for Titanium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
NativeControls - This module helps to create android native controls in titanium.&lt;br /&gt;
&lt;br /&gt;
My Colleague J.Kabeer given an idea to implement module for missing Android native controls.&lt;br /&gt;
&lt;br /&gt;
Initially we start this module with RadioGroup and later version we will plan to update most of the controls.&lt;br /&gt;
&lt;br /&gt;
Feature:&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Create android native &lt;b&gt;RadioGroup &lt;/b&gt;in titanium&lt;/li&gt;
&lt;li&gt;You can set the default &lt;b&gt;selectedIndex&lt;/b&gt; value to RadioGroup&lt;/li&gt;
&lt;li&gt;You can add &quot;&lt;b&gt;chage&lt;/b&gt;&quot; EventListener to RadioGroup&lt;/li&gt;
&lt;li&gt;You can get selected RadioButton Object value &amp;nbsp;using &lt;b&gt;getSelectedIndexValue() &lt;/b&gt;Method&lt;/li&gt;
&lt;li&gt;Define text color by set&amp;nbsp;&lt;b&gt;textColor &lt;/b&gt;value&lt;/li&gt;
&lt;li&gt;Define layoutType by set the &lt;b&gt;layoutType = &quot;horizontal/vertical&quot;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Passing radio buttons as array of object in &quot;&lt;b&gt;buttons&lt;/b&gt;&quot; &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;var nativecontrols = require(&#39;learnappcelerator.nativecontrols&#39;);

var radiogroup = nativecontrols.createRadioGroup({
 width : Ti.UI.SIZE,
 height : Ti.UI.SIZE,
 top : 100,
 left : 10,
 textColor : &quot;&quot;,
 selectedIndex : 2,
 layoutType : &quot;vertical&quot;,
 buttons : [{
  id : 1,
  text : &#39;value 11&#39;
 }, {
  id : 2,
  text : &#39;value 12&#39;
 }, {
  id : 3,
  text : &#39;value 13&#39;
 }]
});

radiogroup.addEventListener(&#39;change&#39;, function(e) {
 alert(JSON.stringify(e.result));
 var obj=radiogroup.getSelectedButton();
 Ti.API.info(&quot;selected ButtonValue =&quot;+JSON.stringify(obj));
});

win.add(radiogroup);
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Screenshots&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-dpebvmyHxnE/Uh9WvYHX-2I/AAAAAAAAAGg/BXFeecMelj0/s1600/radiogroup.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-dpebvmyHxnE/Uh9WvYHX-2I/AAAAAAAAAGg/BXFeecMelj0/s1600/radiogroup.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-tqGsMNIdXxc/Uh9W1Fox1CI/AAAAAAAAAGo/0cx4KhtmS9A/s1600/rd.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-tqGsMNIdXxc/Uh9W1Fox1CI/AAAAAAAAAGo/0cx4KhtmS9A/s1600/rd.png&quot; height=&quot;320&quot; width=&quot;179&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
Version 1.1 - &amp;nbsp; &amp;nbsp;RadioGroup &amp;nbsp; - available&lt;br /&gt;
&lt;br /&gt;
Version 1.2 - &amp;nbsp;AutoCompleteTexBox &amp;nbsp;- will update soon.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Download:&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: white; color: #666666; font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Module: &amp;nbsp;&lt;/b&gt;&lt;a href=&quot;https://marketplace.appcelerator.com/apps/6378?759209041&quot;&gt;https://marketplace.appcelerator.com/apps/6378?759209041&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/8268086796360900943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/08/android-native-controls-module-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/8268086796360900943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/8268086796360900943'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/08/android-native-controls-module-for.html' title='Android Native Controls Module for Titanium'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-dpebvmyHxnE/Uh9WvYHX-2I/AAAAAAAAAGg/BXFeecMelj0/s72-c/radiogroup.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-8845126088555688783</id><published>2013-08-21T23:55:00.001-07:00</published><updated>2013-08-21T23:55:40.615-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="Alloy JSON object Sort by Date"/><category scheme="http://www.blogger.com/atom/ns#" term="display in tableview"/><title type='text'>Alloy -  REST API Json to TableView</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
I am creating simple application for fetching JSON data from REST API and display the data to Table View.&lt;br /&gt;
&lt;br /&gt;
You can download the source code from &lt;a href=&quot;https://bitbucket.org/prakashmcam/json2tableview&quot; target=&quot;_blank&quot;&gt;json2tableview repository&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Steps:&lt;/b&gt;&lt;/h3&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
1. Create simple alloy Project&lt;br /&gt;
2. Modify index.xml&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&lt;alloy&gt;
 &lt;window title=&quot;Categories&quot;&gt;
  &lt;tableview id=&quot;table&quot; onclick=&quot;openDetail&quot;&gt;&lt;/tableview&gt;
 &lt;/window&gt;

&lt;/alloy&gt;
&lt;/pre&gt;
&lt;/br&gt;
3. Modify index.js &lt;/br&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;
function openDetail(e) {
 alert(&#39;row index = &#39; + JSON.stringify(e.index));
 //Ti.API.info(&#39;row rowData = &#39; + JSON.stringify(e.rowData));
 //Ti.API.info(&#39;row index = &#39; + JSON.stringify(e..index));
}

var data = [];

var sendit = Ti.Network.createHTTPClient({

 onerror : function(e) {

  Ti.API.debug(e.error);

  alert(&#39;There was an error during the connection&#39;);

 },

 timeout : 1000,

});

// Here you have to change it for your local ip

sendit.open(&#39;GET&#39;, &#39;https://maps.googleapis.com/maps/api/place/nearbysearch/json?types=hospital&amp;location=13.01883,80.266113&amp;radius=1000&amp;sensor=false&amp;key=AIzaSyDStAQQtoqnewuLdFwiT-FO0vtkeVx8Sks&#39;);

sendit.send();

// Function to be called upon a successful response

sendit.onload = function() {

 var json = JSON.parse(this.responseText);

 // var json = json.todo;

 // if the database is empty show an alert

 if (json.length == 0) {
  $.table.headerTitle = &quot;The database row is empty&quot;;
 }

 // Emptying the data to refresh the view

 // Insert the JSON data to the table view
 var countries = json.results;
 for ( var i = 0, iLen = countries.length; i &lt; iLen; i++) {

  data.push(Alloy.createController(&#39;row&#39;, {
   icon : countries[i].icon,
   name : countries[i].name

  }).getView());

  // data.push(row);

  Ti.API.info(countries[i].icon);
  Ti.API.info(countries[i].name);

 }

 $.table.setData(data);
};

$.index.open();
&lt;/pre&gt;&lt;/br&gt;
4. Create Alloy Controller &lt;b&gt;row&lt;/b&gt; (it create row.xml, row.js, row.tss) &lt;/br&gt;
5. Modify row.xml &lt;/br&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&lt;Alloy&gt;
 &lt;TableViewRow&gt;
  &lt;ImageView id=&quot;icon&quot;&gt;&lt;/ImageView&gt;&gt;
  &lt;Label id=&quot;catID&quot;/&gt;
 &lt;/TableViewRow&gt;
&lt;/Alloy&gt;
&lt;/pre&gt;&lt;/br&gt;
6. Modify row.js &lt;/br&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var args = arguments[0] || {};

$.icon.image = args.icon;
$.catID.text = ar
&lt;/pre&gt;
&lt;/br&gt;
7. Add styles to tss files
&lt;/br&gt;
index.tss &lt;/br&gt;

&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&quot;Window&quot;:{
 backgroundColor :&quot;#FFF&quot;,
 exitOnClose:true,
 navBarHidden:true
}

&lt;/pre&gt;&lt;br&gt;

row.tss &lt;/br&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&quot;#icon&quot;:{
 left:0,
 height:50,
 width:50
}

&quot;TableViewRow&quot;:{
 layout:&quot;horizontal&quot;
}

&quot;Label&quot;:{
 color:&#39;#000&#39;,
 font:{
  fontFamily:&quot;Ariel&quot;,
  fontSize:&#39;20dp&#39;,
  fontWeight:&#39;bold&#39;
 }
}

&lt;/pre&gt;&lt;br&gt;&lt;br&gt;

Thanks
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/8845126088555688783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/08/alloy-rest-api-json-to-tableview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/8845126088555688783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/8845126088555688783'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/08/alloy-rest-api-json-to-tableview.html' title='Alloy -  REST API Json to TableView'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-8559540409155404426</id><published>2013-08-11T23:23:00.001-07:00</published><updated>2013-08-12T00:09:58.917-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android Module"/><category scheme="http://www.blogger.com/atom/ns#" term="Modules"/><category scheme="http://www.blogger.com/atom/ns#" term="Photo sharing"/><category scheme="http://www.blogger.com/atom/ns#" term="Pinterest Module"/><category scheme="http://www.blogger.com/atom/ns#" term="titanium"/><title type='text'>Pinterest Module for Photo sharing - Titanium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi.&lt;br /&gt;
&lt;br /&gt;
Recently I have developed new titanium module for photo sharing in &quot;Pinterest&quot;. This module helps you to sharing images in pinterest. Currently this module only for android.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-oW1CUqvBjV0/Ugh-IhFYuUI/AAAAAAAAAF8/Q-XzAoXq5yg/s1600/pinterest-product-release.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-oW1CUqvBjV0/Ugh-IhFYuUI/AAAAAAAAAF8/Q-XzAoXq5yg/s1600/pinterest-product-release.png&quot; height=&quot;135&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Download module from here &lt;a href=&quot;https://marketplace.appcelerator.com/apps/6228?377227716&quot; target=&quot;_blank&quot;&gt;Pinterest - Android Module &lt;/a&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Pinterest Module&lt;/h3&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Description&lt;/h3&gt;
This module is used to share the photos in pinterest from titanium.&lt;br /&gt;
&lt;h2&gt;
Accessing the pinterest-android Module&lt;/h2&gt;
To access this module from JavaScript, you would do the following:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var pinterest = require(&quot;learnappcelerator.pinterest&quot;);
&lt;/code&gt;&lt;/pre&gt;
The pinterest variable is a reference to the Module object. &lt;br /&gt;
&lt;h3&gt;
setClientId(&quot;clientId&quot;);&lt;/h3&gt;
This is an required Field. You should login into developer.pinterest.com and register you appname. you can get client ID.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;pinterest.setClientId(&quot;xxxxxxx&quot;); //replace with your client ID
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
setDebugMode(flag);&lt;/h3&gt;
This property is optional. If you want to get error logs in console set this as true.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;pinterest.setDebugMode(true);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
pinterest.createPinterest()&lt;/h3&gt;
This method used to create the pinIt button.&lt;br /&gt;
&lt;h2&gt;
Usage&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;var pinterest = require(&quot;learnappcelerator.pinterest&quot;);
pinterest.setClientId(&quot;xxxxxxx&quot;);
pinterest.setDebugMode(true);
var pin1 = pinterest.createPin({
        width: 150,
        height: 90,
        top: 100,
        left: 150,
        imageUrl:&quot;http://placekitten.com/400/300&quot;,
        baseUrl:&quot;http://placekitten.com&quot;,
        description:&quot;kitten image!&quot;
});
win.add(pin1);
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;
Author&lt;/h2&gt;
Author Name : M. Prakash&lt;br /&gt;
Email : prakashmca.m@gmail.com&lt;br /&gt;
Blog : http://www.learnappcelerator.blogspot.com&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Screen shots:&lt;/b&gt; &lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/--jFUqRLWEV0/Ugh-zgLlFdI/AAAAAAAAAGQ/W96SS5otmJc/s1600/testPinterest-screen1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/--jFUqRLWEV0/Ugh-zgLlFdI/AAAAAAAAAGQ/W96SS5otmJc/s1600/testPinterest-screen1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-qF41s5rl8qY/Ugh-zF1hkBI/AAAAAAAAAGM/qbS7zs7Hwts/s1600/shareimage-screen2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-qF41s5rl8qY/Ugh-zF1hkBI/AAAAAAAAAGM/qbS7zs7Hwts/s1600/shareimage-screen2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;goog_1242206303&quot;&gt;Thanks.&lt;/span&gt;&lt;span id=&quot;goog_1242206304&quot;&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/8559540409155404426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/08/hi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/8559540409155404426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/8559540409155404426'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/08/hi.html' title='Pinterest Module for Photo sharing - Titanium'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-oW1CUqvBjV0/Ugh-IhFYuUI/AAAAAAAAAF8/Q-XzAoXq5yg/s72-c/pinterest-product-release.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-2347109407747801866</id><published>2013-07-18T02:19:00.002-07:00</published><updated>2013-07-27T03:37:00.083-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="alloy framework"/><category scheme="http://www.blogger.com/atom/ns#" term="RSS Feed Reader"/><category scheme="http://www.blogger.com/atom/ns#" term="titanium"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Alloy - RSS Feed Parser </title><content type='html'>&lt;script&gt;
  (function(i,s,o,g,r,a,m){i[&#39;GoogleAnalyticsObject&#39;]=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,&#39;script&#39;,&#39;//www.google-analytics.com/analytics.js&#39;,&#39;ga&#39;);

  ga(&#39;create&#39;, &#39;UA-42751276-1&#39;, &#39;learnappcelerator.blogspot.com&#39;);
  ga(&#39;send&#39;, &#39;alloy-RSSFeedParser&#39;);

&lt;/script&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
RSS feeds benefit publishers by letting them syndicate content automatically. A standardized XML
 file format allows the information to be published once and viewed by 
many different programs. They benefit readers who want to subscribe to 
timely updates from favorite websites or to aggregate feeds from many 
sites into one place.&lt;br /&gt;
&lt;br /&gt;
I am creating a simple RSS Reader which get the rss feed from given url and parse the xml data.&lt;br /&gt;
&lt;br /&gt;
And return array of objects which is easy to manipulate in your titanium application. &lt;br /&gt;
&lt;br /&gt;
I am creating sample project in alloy framework.&lt;br /&gt;
&lt;br /&gt;
Download source code from github &lt;a href=&quot;https://github.com/prakashmcam/rss-feed-reader-alloy&quot; target=&quot;_blank&quot;&gt;RSS-Feed-Reader&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can find &lt;b&gt;rss.js&amp;nbsp; &lt;/b&gt;file in /lib directory.&lt;br /&gt;
&lt;br /&gt;
usage of this file is,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var rss = require(&#39;rss&#39;);
var RSS_URL = OS_MOBILEWEB ? &#39;/goirss.xml&#39; : &#39;http://www.thehindu.com/news/national/tamil-nadu/?service=rss&#39;;
// open detail window
function openDetail(e) {
 $.trigger(&#39;detail&#39;, e);
}

// Refresh table data from remote RSS feed
function refreshRss() {
 rss.loadRssFeed(RSS_URL, {
  success : function(data) {
   var rows = [];
   _.each(data, function(item) {
    rows.push(Alloy.createController(&#39;row&#39;, {
     articleUrl : item.link,
     title : item.title,
     date : item.pubDate,
     description : item.description
    }).getView());
   });
   $.table.setData(rows);
  }
 });
}

// do initial load of RSS
refreshRss(); 
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you.
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/2347109407747801866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-rss-feed-parser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/2347109407747801866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/2347109407747801866'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-rss-feed-parser.html' title='Alloy - RSS Feed Parser '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-9150993927613527934</id><published>2013-07-12T06:06:00.001-07:00</published><updated>2013-07-12T06:06:21.314-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="createTable"/><category scheme="http://www.blogger.com/atom/ns#" term="example"/><category scheme="http://www.blogger.com/atom/ns#" term="insert values"/><category scheme="http://www.blogger.com/atom/ns#" term="model"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlite"/><category scheme="http://www.blogger.com/atom/ns#" term="titaniumm"/><title type='text'>Alloy - Sqlite CreateTable Example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I created the sample project for createTable into preloaded sqlite database in Alloy Framework&lt;br /&gt;
&lt;br /&gt;
download working example form gist &lt;a href=&quot;https://github.com/prakash-anubavam/alloycreateTable&quot; target=&quot;_blank&quot;&gt;alloySqliteCreateTable&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Main logic written in &lt;b&gt;app/controller/index.js&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
function createTable(e) {  
 var db = Ti.Database.open(&#39;codeguru&#39;);
 if(db){
  db.execute(&#39;CREATE TABLE people (name TEXT, phone_number TEXT, city TEXT)&#39;);
  var thisName = &#39;Arthur&#39;;
  var thisPhoneNo = &#39;1-617-000-0000&#39;;
  var thisCity = &#39;Mountain View&#39;;
  db.execute(&#39;INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)&#39;, thisName, thisPhoneNo, thisCity);

  var personArray = [&#39;Paul&#39;,&#39;020 7000 0000&#39;, &#39;London&#39;];
  db.execute(&#39;INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)&#39;, personArray);

  var rows = db.execute(&#39;SELECT rowid,name,phone_number,city FROM people&#39;);
  while (rows.isValidRow())
  {
    Ti.API.info(&#39;Person ---&amp;gt; ROWID: &#39; + rows.fieldByName(&#39;rowid&#39;) + &#39;, name:&#39; + rows.field(1) + &#39;, phone_number: &#39; + rows.fieldByName(&#39;phone_number&#39;) + &#39;, city: &#39; + rows.field(3));
    rows.next();
  }
  rows.close();
 }
    alert($.label.text);
}
&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;
This is an quick fix for creating table in runtime.

And I will working on collection of data inserted through model.js&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp;For now, Refer this following repository for bulk updates in sqlite db alloy framework,
One way to do bulk updates and deletes with Appcelerator Alloy Collections &lt;a href=&quot;https://gist.github.com/aaronksaunders/5066608/&quot;&gt;bulk_update&lt;/a&gt;
&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/9150993927613527934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-sqlite-createtable-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/9150993927613527934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/9150993927613527934'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-sqlite-createtable-example.html' title='Alloy - Sqlite CreateTable Example'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-6412828605843721834</id><published>2013-07-11T05:32:00.000-07:00</published><updated>2013-07-11T05:32:16.738-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="Alloy JSON object Sort by Date"/><category scheme="http://www.blogger.com/atom/ns#" term="Framwork"/><category scheme="http://www.blogger.com/atom/ns#" term="sort json array of objects"/><category scheme="http://www.blogger.com/atom/ns#" term="titanium"/><title type='text'>JSON object Sorted by Date</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Many of them asking how to sort my json objects based on date. And writing many lines of code, sometimes get tired to sort the json object. Here I found simple function to sort your json object based on date.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Not only date you can sort json object based on any attribute by writing custom sort function in your code.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Let me explain how to create custom sort function in java script.&lt;br /&gt;
&lt;br /&gt;
You can download the sample app source code from git repository &lt;a href=&quot;https://github.com/prakash-anubavam/sortjsonobjectbydate&quot; target=&quot;_blank&quot;&gt;Sort Json by Date&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Example JSON object:&lt;/div&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var latestOffers=[
          {id: &#39;1&#39;, date: &#39;20 Dec 2012, 8:00 am&#39;, text:&#39;item1&#39;},
          {id: &#39;2&#39;,  date: &#39;29 Jun 2012, 5:47 pm&#39;, text:&#39;item2&#39;},
          {id: &#39;3&#39;, date: &#39;15 May 2013, 6:40 pm&#39;, text:&#39;item3&#39;}         
        ]; 
&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
Now I write &lt;b&gt;sortbydate()&lt;/b&gt; function
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;function sortbydate(a, b) {
    // change the &amp;lt; condition to &amp;gt; for reverse the sort.
    // here you can add your own sorting condition 
    // eg,   return a.id &amp;lt; b.id;   //its sort your object based on id.
    return new Date(a.date).getTime() &amp;lt; new Date(b.date).getTime();
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
Now you can call the Array.sort() with your sortbydate function.
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
latestOffers.sort(sortbydate);
Ti.API.info(&#39;sorted json array ===&#39;+ JSON.stringify(latestOffers));
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/6412828605843721834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/json-object-sorted-by-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/6412828605843721834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/6412828605843721834'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/json-object-sorted-by-date.html' title='JSON object Sorted by Date'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-6898913565714427806</id><published>2013-07-11T04:01:00.000-07:00</published><updated>2013-07-11T04:25:54.039-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="alloy framework"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="db"/><category scheme="http://www.blogger.com/atom/ns#" term="model"/><category scheme="http://www.blogger.com/atom/ns#" term="preloaded"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlite"/><category scheme="http://www.blogger.com/atom/ns#" term="tableview"/><category scheme="http://www.blogger.com/atom/ns#" term="titanium"/><title type='text'>Alloy Framework - Use Preloaded Sqlite Database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Most of time you may need to use the preloaded db in your application.&lt;br /&gt;
&lt;br /&gt;
We are going to see How to use preloaded SQLite Database in Alloy framework in titanium.&lt;br /&gt;
&lt;br /&gt;
Download the source code from git repository &amp;nbsp;&lt;a href=&quot;https://github.com/prakash-anubavam/alloypreloadedsqlitedb&quot; target=&quot;_blank&quot;&gt;AlloySqlitedb&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
1. Open the Titanium Studio &amp;nbsp;(I am using 3.1.1)&lt;br /&gt;
2. create &lt;a href=&quot;http://learnappcelerator.blogspot.in/p/blog-page_24.html&quot; target=&quot;_blank&quot;&gt;New Alloy Mobile Project&amp;nbsp;&lt;/a&gt;&amp;nbsp;(refer the Link for creating New Alloy Project)&lt;br /&gt;
3. Put your sqlite database file into app/assets folder. (I am using myapp.sqlite)&lt;br /&gt;
4.create collections object in alloy.js file.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
Alloy.Collections.fighters = Alloy.createCollection(&#39;fighters&#39;);
&lt;/pre&gt;
&lt;br /&gt;
5.create model file &lt;b&gt;&quot;fighters.js&quot;&lt;/b&gt; in &lt;b&gt;app/model&lt;/b&gt; directory.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
exports.definition = {
  config:{
   
   adapter:{
    &quot;type&quot;:&quot;sql&quot;,
    &quot;collection_name&quot;:&quot;fighters&quot;,
    &quot;db_file&quot;: &quot;/myapp.sqlite&quot;,
    &quot;db_name&quot;: &quot;fighters&quot;,
    &quot;idAttribute&quot;: &quot;id&quot;,
    &quot;remoteBackup&quot;:false
   }
  }
}
&lt;/pre&gt;
&lt;br /&gt;
6.Modify index.xml file in app/views/ directory - create Table View.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&lt;alloy&gt;
    &lt;window&gt;
        &lt;label id=&quot;title&quot; onclick=&quot;addTestFighter&quot;&gt;Fighters&lt;/label&gt;
        &lt;tableview datacollection=&quot;fighters&quot; id=&quot;table&quot; onclick=&quot;showId&quot;&gt;
            &lt;require src=&quot;row&quot;&gt;
        &lt;/require&gt;&lt;/tableview&gt;
    &lt;/window&gt;
&lt;/alloy&gt;
&lt;/pre&gt;
&lt;br /&gt;
7. Create controller index.js file in app/controller directory&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var fighters = Alloy.Collections.fighters;
var counter = 1;

function showId(e) {
 if (e.row.model) {
  //alert(e.row.model);
  var detailObj=fighters.get(e.row.model);
  var win=Alloy.createController(&#39;detail&#39;,{&quot;$model&quot;:detailObj});
     win.getView().open();
 }
}

function addTestFighter(e) {
 // create the test fighter model
 var model = Alloy.createModel(&#39;fighters&#39;, {
  name: &#39;Name &#39; + counter,
  nickname: &#39;Nickname &#39; + counter
 });
 counter++;

 // add model to the collection and save it to sqlite
 fighters.add(model);
 model.save();

 // let&#39;s refresh so we can see the ids coming from the 
 // autoincrement field in the sqlite database in the 
 // row click alerts
 fighters.fetch();
}

fighters.fetch();

$.index.open();
&lt;/pre&gt;
&lt;br /&gt;
8. Create layout for row.xml in app/views directory&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&lt;alloy&gt;
 &lt;tableviewrow&gt;
  &lt;label id=&quot;name&quot; text=&quot;{name}&quot;&gt;
  &lt;label id=&quot;nickname&quot; text=&quot;{nickname}&quot;&gt;
 &lt;/label&gt;&lt;/label&gt;&lt;/tableviewrow&gt;
&lt;/alloy&gt;
&lt;/pre&gt;
&lt;br /&gt;
9. Create controller row.js in app/controller directory&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
// Attach the bound model ($model) to the row so 
// we can access it in a click event.
if ($model) {
 $.row.model = $model.toJSON();
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Create layout for for detail.xml in app/views directory&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&lt;alloy&gt;
 &lt;window id=&quot;detail&quot;&gt;
  &lt;scrollview layout=&quot;vertical&quot;&gt;
   &lt;view layout=&quot;vertical&quot;&gt;
    &lt;label id=&quot;name&quot; text=&quot;{name}&quot;&gt;
    &lt;label id=&quot;nickname&quot; text=&quot;{nickname}&quot;&gt;
   &lt;/label&gt;&lt;/label&gt;&lt;/view&gt;&amp;gt;
  &lt;/scrollview&gt;&amp;gt;
 &lt;/window&gt;&amp;gt;

&lt;/alloy&gt;

&lt;/pre&gt;
&lt;br /&gt;
11. Create controller detail.js in app/controller directory.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var args=arguments[0]||{};
if(args.$model){
 Ti.API.info(&#39;model =&#39;+JSON.stringify(args.$model));
 var dataJson=args.$model.toJSON();
}else{
 alert(&#39;data not passed&#39;);
}
&lt;/pre&gt;
&lt;br /&gt;
12. Finally add the styles to your layouts in app/styles&lt;br /&gt;
&lt;br /&gt;
a. index.tss&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&quot;Window&quot;: {
 backgroundColor: &#39;#fff&#39;,
 navBarHidden: true,
 exitOnClose: true
}

&quot;#title&quot;: {
 top: 0,
 height: &#39;50dp&#39;,
 width: Ti.UI.FILL,
 color: &#39;#fff&#39;,
 backgroundColor: &#39;#a00&#39;,
 font: {
  fontSize: &#39;36dp&#39;,
  fontWeight: &#39;bold&#39;
 },
 textAlign: &#39;center&#39;
}

&quot;#table&quot;: {
 top: &#39;50dp&#39;,
 bottom: 0
}
&lt;/pre&gt;
&lt;br /&gt;
b.row.tss&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&quot;#row&quot;: {
 height: &#39;60dp&#39;,
 backgroundColor: &#39;#fff&#39;
}

&quot;Label&quot;: {
 height: Ti.UI.SIZE,
 width: Ti.UI.SIZE
}

&quot;#name&quot;: {
 top: &#39;7dp&#39;,
 left: &#39;7dp&#39;,
 font: {
  fontSize: &#39;24dp&#39;,
  fontWeight: &#39;bold&#39;
 }
}

&quot;#nickname&quot;: {
 bottom: &#39;7dp&#39;,
 left: &#39;14dp&#39;,
 font: {
  fontSize: &#39;16dp&#39;,
  fonWeight: &#39;normal&#39;
 }
}
&lt;/pre&gt;
&lt;br /&gt;
c. detail.tss&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&quot;Window&quot;: {
 backgroundColor: &#39;#fff&#39;,
 navBarHidden: true
}
&quot;#name&quot;: {
 top: &#39;10dp&#39;,
 font: {
  fontSize: &#39;24dp&#39;,
  fontWeight: &#39;bold&#39;
 }
}

&quot;#nickname&quot;: {
 top: &#39;10dp&#39;,
 font: {
  fontSize: &#39;16dp&#39;,
  fonWeight: &#39;normal&#39;
 }
}
&lt;/pre&gt;
&lt;br /&gt;
13. Here we go and run the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/6898913565714427806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-framework-use-preloaded-sqlite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/6898913565714427806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/6898913565714427806'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-framework-use-preloaded-sqlite.html' title='Alloy Framework - Use Preloaded Sqlite Database'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-3631866000377054850</id><published>2013-07-11T02:23:00.000-07:00</published><updated>2013-07-11T02:25:12.743-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Alloy"/><category scheme="http://www.blogger.com/atom/ns#" term="Animation"/><category scheme="http://www.blogger.com/atom/ns#" term="builtin library"/><category scheme="http://www.blogger.com/atom/ns#" term="chain animation"/><category scheme="http://www.blogger.com/atom/ns#" term="collection"/><category scheme="http://www.blogger.com/atom/ns#" term="crossfade"/><category scheme="http://www.blogger.com/atom/ns#" term="fadeAndRemove"/><category scheme="http://www.blogger.com/atom/ns#" term="fadeout"/><category scheme="http://www.blogger.com/atom/ns#" term="fadin"/><category scheme="http://www.blogger.com/atom/ns#" term="flash"/><category scheme="http://www.blogger.com/atom/ns#" term="popIn"/><category scheme="http://www.blogger.com/atom/ns#" term="shake"/><title type='text'>Alloy Animation - builtin library</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Titanium alloy framework provide&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;collection of useful animation utilities. To use the animation builtin library, all you need to do is require it with the&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; font-style: inherit; line-height: 13px; margin: 0px; padding: 0px;&quot;&gt;alloy&lt;/code&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;root directory in your&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; font-style: inherit; line-height: 13px; margin: 0px; padding: 0px;&quot;&gt;require&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;call. For example:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;pre class=&quot;prettyprint&quot; id=&quot;ext-gen1339&quot; style=&quot;background-color: #f7f7f7; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; border: 1px solid rgb(232, 232, 232); box-sizing: border-box; color: #314e64; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 1.3em; margin-bottom: 14px; margin-top: 10px; max-width: 900px; overflow-x: auto; overflow-y: hidden; padding: 10px 12px;&quot;&gt;&lt;code id=&quot;ext-gen1340&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-style: inherit; line-height: 13px; margin: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box;&quot;&gt;var&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; animation &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box;&quot;&gt;require&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;alloy/animation&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;
animation&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;crossFade&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt;view1&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; view2&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box;&quot;&gt;500&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box;&quot;&gt; finishCallback&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div class=&quot;member not-inherited first-child open&quot; id=&quot;method-chainAnimate&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 1px 0px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
&lt;br /&gt;chainAnimate(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;view,&amp;nbsp;Titanium.UI.Animation[] animations, [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Executes a series of animations on the target view.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-crossFade&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
crossFade(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;from,&amp;nbsp;Titanium.UI.View&amp;nbsp;to, Number duration, [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Transitions from one view to another using a cross-fade animation.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-fadeAndRemove&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
fadeAndRemove(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;from, Number duration,&amp;nbsp;Titanium.UI.View&amp;nbsp;container, [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Fades out a view then removes it from its parent view.&lt;span style=&quot;color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-fadeIn&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
fadeIn(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;to, Number duration, [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Fades in the specified view.&lt;span style=&quot;color: #444444; font-size: 1.1em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-fadeOut&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
fadeOut(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;to, Number duration, [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Fades out the specified view.&lt;span style=&quot;color: #444444; font-size: 1.1em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-flash&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
flash(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;view, [Number delay], [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Flashes the target view twice, fading to partially transparent then back to fully-opaque.&lt;span style=&quot;color: #444444; font-size: 1.1em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-popIn&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
popIn(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;view, [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Makes the specified view appear using a &quot;pop-in&quot; animation, which combines a fade-in with a slight expanding and contracting animation, to call attention to the new view.&lt;span style=&quot;color: #444444; font-size: 1.1em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;member  not-inherited open&quot; id=&quot;method-shake&quot; style=&quot;background-color: white; border-color: rgb(224, 224, 224); border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; color: #444444; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; min-height: 2.5em; padding: 10px 22px; position: relative;&quot;&gt;
&lt;div class=&quot;title&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 3px;&quot;&gt;
shake(&amp;nbsp;&lt;span class=&quot;pre&quot; style=&quot;box-sizing: border-box; font-family: Menlo, &#39;Courier New&#39;, Courier, monospace; font-size: 0.9em;&quot;&gt;Titanium.UI.View&amp;nbsp;view, [Number delay], [function() finishCallback]&lt;/span&gt;&amp;nbsp;)&lt;/div&gt;
&lt;div class=&quot;description&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;long&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; color: #484848; margin-bottom: 1em; max-width: 900px; padding: 0px;&quot;&gt;
Creates a shake animation, moving the target view back and forth rapidly several times.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;Example:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;1. open Titanium Studio&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;2&lt;a href=&quot;http://learnappcelerator.blogspot.in/p/blog-page_24.html&quot; target=&quot;_blank&quot;&gt;. create New Alloy Project&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;3. Modify views/index.xml&lt;/span&gt;&lt;/div&gt;

&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 

     &lt;Alloy&gt;
        &lt;Window class=&quot;container&quot;&gt;
             &lt;View id=&quot;square&quot;/&gt; 
             &lt;Button id=&quot;square&quot; onClick=&quot;shakeMe&quot;/&gt; 
        &lt;/Window&gt;
     &lt;/Alloy&gt;

&lt;/pre&gt;

&lt;div&gt;
4. Modify styles/index.tss&lt;/div&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
&quot;.container&quot;: {
 backgroundColor:&quot;white&quot;
},
&quot;#square&quot;: {
 width: 200,
 height: 200,
 color: &quot;#f00&quot;
} 

&quot;#shakeMe&quot;:{
 title:&#39;Shake Me&#39;,
 bottom:&#39;100dp&#39;
}

&lt;/pre&gt;
&lt;br&gt;
5. Modify controllers/index.js&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
function shakeMe(e) {
    var animation = require(&#39;alloy/animation&#39;);
    animation.shake($.view2, 500);
}

$.index.open();
&lt;/pre&gt; 
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, helvetica, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;6. Run the project and click the button.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, helvetica, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444; font-family: Helvetica Neue, helvetica, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19.5px;&quot;&gt;Thanks.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Helvetica Neue&#39;, helvetica, arial, sans-serif; font-size: 13px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/3631866000377054850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-animation-builtin-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/3631866000377054850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/3631866000377054850'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/07/alloy-animation-builtin-library.html' title='Alloy Animation - builtin library'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-5066038258665521061</id><published>2013-06-24T02:38:00.000-07:00</published><updated>2013-06-24T03:58:59.607-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android Module"/><category scheme="http://www.blogger.com/atom/ns#" term="Garbage Collector"/><category scheme="http://www.blogger.com/atom/ns#" term="Modules"/><title type='text'>Garbage Collector - Titanium Module for Android</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Recently I developed an native module called Garbage Collector Module and published in Appcelerator Marketplace.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-nDgy9ASCT30/UcgMRL7u5YI/AAAAAAAAACg/oeYwAMLOFAw/s1600/gc_module.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;122&quot; src=&quot;http://4.bp.blogspot.com/-nDgy9ASCT30/UcgMRL7u5YI/AAAAAAAAACg/oeYwAMLOFAw/s400/gc_module.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This module is used to Monitor your android device heap memory and force the garbage collector for free the unused objects.&lt;br /&gt;
&lt;br /&gt;
Using this module we can get following informations,&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;MaxVMHeapSize&lt;/li&gt;
&lt;li&gt;NativeHeapSize&lt;/li&gt;
&lt;li&gt;VMHeapSize&lt;/li&gt;
&lt;li&gt;TotalHeapSize&lt;/li&gt;
&lt;li&gt;VMAllocatedHeapSize&lt;/li&gt;
&lt;li&gt;NativeHeapAllocatedSize&lt;/li&gt;
&lt;li&gt;VMHeapTotalAllocatedSize&lt;/li&gt;
&lt;li&gt;&amp;nbsp;VMHeapFreeMemory&lt;/li&gt;
&lt;li&gt;VMHeapTotalFreeMemory&lt;/li&gt;
&lt;/ul&gt;
And Also we have two more public methods called,&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;isOutOfMemoryException() &amp;nbsp; - we can check the Memory exception before app get crash.&lt;/li&gt;
&lt;li&gt;callGC() - This method force the garbage collector and release the memory occupied by unused objects. &lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;&lt;b&gt;Accessing the Garbage Collector Module&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To access this module from JavaScript, you would do the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;var garbagecollector = require(&quot;prakash.garbagecollector&quot;);
&lt;/pre&gt;
&lt;br /&gt;
Force Garbage Collector&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;garbagecollector.callGC(); &lt;/pre&gt;
&lt;br /&gt;
Check MemoryException&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;garbagecollector.isOutOfMemoryException();&amp;nbsp; returns true/false

Check Heap Memory Status
garbagecollector.getMaxVMHeapSize();
garbagecollector.getNativeHeapSize();
garbagecollector.getVMHeapSize();
garbagecollector.getTotalHeapSize();
garbagecollector.getVMAllocatedHeapSize();
garbagecollector.getNativeHeapAllocatedSize();
garbagecollector.getVMHeapTotalAllocatedSize();
garbagecollector.getVMHeapFreeMemory();
garbagecollector.getVMHeapTotalFreeMemory(); 

&lt;/pre&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
Sample App Screenshot&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-9Q38IUHRlYc/UcgSsu70UtI/AAAAAAAAACw/4Qx3m17foyY/s1600/img5380054017575739710.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://2.bp.blogspot.com/-9Q38IUHRlYc/UcgSsu70UtI/AAAAAAAAACw/4Qx3m17foyY/s400/img5380054017575739710.png&quot; width=&quot;224&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Module URL :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://marketplace.appcelerator.com/apps/5834?2036618235&quot;&gt;https://marketplace.appcelerator.com/apps/5834?2036618235&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/5066038258665521061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2013/06/garbage-collector-titanium-module-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/5066038258665521061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/5066038258665521061'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2013/06/garbage-collector-titanium-module-for.html' title='Garbage Collector - Titanium Module for Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-nDgy9ASCT30/UcgMRL7u5YI/AAAAAAAAACg/oeYwAMLOFAw/s72-c/gc_module.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-7765601168084865865</id><published>2012-10-05T04:39:00.000-07:00</published><updated>2012-10-05T04:40:48.215-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="error Loading Remote JPG images"/><category scheme="http://www.blogger.com/atom/ns#" term="Loading Remote JPG images in Android"/><title type='text'>Loading Remote JPG images in Android - Appcelerator Titanium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi....&lt;br /&gt;
&lt;br /&gt;
When I trying to Load the set of JPG images from json data (remote Images) the following error occurred.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
Bitmap bounds could not be determined. If bitmap is loaded, it won&#39;t be scaled.
&lt;/pre&gt;
but its working fine in iOS. I started the research in INTERNET to fix this problem. Two solutions suggested by most of the people. They are,&lt;br /&gt;
&lt;br /&gt;
1. Disabled FastDev in Android&lt;br /&gt;
2. Increase the VM Heap memory size.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
but These are not solve my Problem. Finally I found one alternate solution for loading Remote JPG images in Android. &lt;br /&gt;
&lt;br /&gt;
I am creating ImageLoader.js file for loading images....&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;color: #990000; text-align: left;&quot;&gt;
ImageLoader.js 
&lt;/h4&gt;
&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt;  
exports.LoadRemoteImage = function (obj,url) {
   var xhr = Titanium.Network.createHTTPClient();

xhr.onload = function()
{
 Ti.API.info(&#39;image data=&#39;+this.responseData);
 obj.image=this.responseData;
 
};
// open the client
xhr.open(&#39;GET&#39;,url);

// send the data
xhr.send();
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
For using this you need to pass imageView object and RemoteImageUrl.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;color: #990000; text-align: left;&quot;&gt;
app.js 
&lt;/h4&gt;

&lt;pre class=&quot;cpp&quot; name=&quot;code&quot;&gt; 
var ImageLoader = require(&#39;ImageLoader&#39;);
var self = Ti.UI.createWindow({
     backgroundColor:&#39;#ffffff&#39;,
  navBarHidden: true,
  fullscreen:true,
  layout:&#39;horizontal&#39;
  
 });
 
for(var i=0;i&lt;5;i++) 
 {
var fullImage = Titanium.UI.createImageView({
    left: 10,
    top : 10,
    width : 100,
    height: 100,
    image:&#39;&#39;
   });
   self.add (fullImage);
 
 ImageLoader.LoadRemoteImage(fullImage,&#39;http://ic.i.tsatic-cdn.net/1213/105_99/29fce_1213904.jpg&#39;);
 
}
&lt;/pre&gt;
&lt;br /&gt;
Finally my problem is solved..... Now Remote JPG Images Loaded fine in android...
&lt;br /&gt;&lt;br /&gt;


I was created Thumbnail album and FullView album by using this ImageLoader.js 
&lt;br /&gt;&lt;br /&gt;
But You cannot pass any other object and can not set as backgroundImage. because when you are trying to load Image through HTTPClient, the image return as blob object. In iOS backgroundImage propert supports blob but not in Android.




&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;b style=&quot;color: #660000;&quot;&gt;Thankyou...........&lt;/b&gt;

&lt;/h4&gt;

&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/7765601168084865865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2012/10/loading-remote-jpg-images-in-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/7765601168084865865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/7765601168084865865'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2012/10/loading-remote-jpg-images-in-android.html' title='Loading Remote JPG images in Android - Appcelerator Titanium'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-3445238172934371983</id><published>2012-10-05T02:37:00.000-07:00</published><updated>2012-10-05T02:41:31.025-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Album creation"/><category scheme="http://www.blogger.com/atom/ns#" term="picture gallery"/><category scheme="http://www.blogger.com/atom/ns#" term="thumbnail view in scrollview"/><title type='text'>Album Creation using scroll view and scrollableView in Titanium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi......&lt;br /&gt;
&lt;br /&gt;
In this post we are going to create Image Album for both thumbnail and fullview.&lt;br /&gt;
&lt;br /&gt;
Design Goal:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The list of images are displayed in thumb size which are loaded into scroll view. when user clicks the particular Thumbnail Image the Image is loaded into Fullview mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start to Code:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 1. First create a window object and add a scroll view that should by in&amp;nbsp; &quot;horizontal&#39; Layout and width is &quot;100%&quot;. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2. Now construct the for loop and Load Images in scrollView.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var self = Ti.UI.createWindow({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; backgroundColor:&#39;#ffffff&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; navBarHidden: true,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fullscreen:true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width:&#39;100%&#39; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var ThumbAlbum=Ti.UI.createScrollView({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; layout:&#39;horizontal&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width:&#39;100%&#39; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.add(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ThumbAlbum&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var totalcount=5;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var i=0;i&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;totalcount&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;;i++)&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var thumb = Titanium.UI.createImageView({&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left: 10,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; top : 10,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width : 100,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; height: 100,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageID:i,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image:&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;http://ic.i.tsatic-cdn.net/1213/105_99/29fce_1213904.jpg&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ThumbAlbum&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;.add (thumb);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.open();&lt;/span&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. Next write fullImageView code in imageview&#39;s click event.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt; ThumbAlbum.addEventListener(&#39;click&#39;,function(e){&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: red;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var FullView=require(&quot;fullviewWindow&quot;);&lt;/div&gt;
&lt;div style=&quot;color: red;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var win=FullView(e.source.imageID,e.source.image,totalcount);&lt;/div&gt;
&lt;div style=&quot;color: red;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; win.open();&lt;/div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. Now create fullviewWindow.js file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; function fullviewWindow (imageID,imageurl,totalcount)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;var self = Ti.UI.createWindow({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; backgroundColor:&#39;#ffffff&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; navBarHidden: true,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fullscreen:true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width:&#39;100%&#39; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; var headerLbl=Ti.UI.createLabel({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; width:&#39;100%&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height:30,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; backgroundColor:&#39;#000&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text:&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;imageID+&#39; of &#39; +&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;totalcount&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;fullimage&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; = Titanium.UI.createImageView({&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left: 0,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; top : 30,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width : &#39;100%&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; height: &#39;90%&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; image:&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;imageurl&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.add(fullimage);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.open();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; module.exports=&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;fullviewWindow;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 5. Run the Program in Emulator/Simulator&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Thankyou......&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/3445238172934371983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2012/10/album-creation-using-scroll-view-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/3445238172934371983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/3445238172934371983'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2012/10/album-creation-using-scroll-view-and.html' title='Album Creation using scroll view and scrollableView in Titanium'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-450300145466385720</id><published>2012-10-05T00:25:00.001-07:00</published><updated>2012-10-05T02:39:53.227-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display in tableview"/><category scheme="http://www.blogger.com/atom/ns#" term="get tweets using json"/><category scheme="http://www.blogger.com/atom/ns#" term="tweets in tableview"/><category scheme="http://www.blogger.com/atom/ns#" term="tweets search"/><category scheme="http://www.blogger.com/atom/ns#" term="twitter search in titanium"/><title type='text'>Simple tweets search app using Titanium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi...&lt;br /&gt;
&lt;br /&gt;
In this post we are going to see simple tweets search app using Titanium appcelerator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Design goal:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Search the tweets based on name and list the results in Table view with tweets photo, name/title, description and posted date. when clicking the particular row the detailed information will be displayed in new window.&lt;br /&gt;
&lt;br /&gt;
Start the Implementation:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&amp;nbsp;&amp;nbsp; create new titanium mobile project and start to edit the app.js (OR)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create new .js file in your existing mobile project.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.&amp;nbsp;&amp;nbsp;&amp;nbsp; create TextField and one Button with title &#39;Search&#39; on the top of the window.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.&amp;nbsp;&amp;nbsp; Now write the code in Search button&#39;s click event.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3a. Twitter provides the api url for search the tweets. &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; var url = &quot;http://search.twitter.com/search.json?q=&quot; + stext.value;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; here, stext.value is the TextField value.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 4b. Now create httpClientRequest object to send the request.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;var xhr = Ti.Network.createHTTPClient({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; onload: function () {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; json = JSON.parse(this.responseText);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loadData(json); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onerror: function (e) { alert(&#39;ERROR&#39;);},&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;timeout: 5000&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xhr.open(&quot;GET&quot;, url);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; xhr.send();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: black;&quot;&gt;4c. Write the definition for function loadData(json)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;function loadData(json)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; if (json.results.length &amp;lt; 10) count = json.results.length;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; else count = 10;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; count; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tweets = json.results[i];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; row = Ti.UI.createTableViewRow({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; height: &#39;auto&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; hasChild: true,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &#39;resultwindow.js&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; iurl: tweets.profile_image_url,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; iname: tweets.from_user,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; itext: tweets.text,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; idate: tweets.created_at,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; id: tweets.from_user_id_str&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var image = Titanium.UI.createImageView({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image: tweets.profile_image_url,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; top: 5,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; left: 5,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height: 60,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width: 60&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; nameLabel = Ti.UI.createLabel({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text: tweets.from_user,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; font: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; fontSize: &#39;12dp&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fontWeight: &#39;bold&#39;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height: &#39;auto&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; left: 70,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; top: 0,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; color: &#39;#f00&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; touchEnabled: false&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; textLabel = Ti.UI.createLabel({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; text: tweets.text,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; fontSize: &#39;8dp&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: &#39;auto&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left: 80,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; top: &#39;15dp&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: &#39;#00f&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; touchEnabled: false&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nickLabel = Ti.UI.createLabel({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text: &#39;&quot;&#39; + tweets.created_at + &#39;&quot;&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; font: {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fontSize: &#39;8dp&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textAlign: &#39;right&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: &#39;auto&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right: 0,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bottom: &#39;2dp&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: &#39;#999&#39;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; touchEnabled: false&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.add(image);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.add(nameLabel);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.add(textLabel);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.add(nickLabel);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableData.push(row);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table.setData(tableData);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: black;&quot;&gt;4d. Write code for Table Click event&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt; table.addEventListener(&#39;click&#39;, function (e) {&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.rowData.url) {&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var win1 = Titanium.UI.createWindow({&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //title:e.rowData.nameLabel.value,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: e.rowData.url,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //navbarHidden: false,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modal: true, // &#39;back&#39; goes to previous window but no OptionMenu&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iurl: e.rowData.iurl,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iname: e.rowData.iname,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itext: e.rowData.itext,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; idate: e.rowData.idate,&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: e.rowData.id&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; win1.open();&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;br style=&quot;color: red;&quot; /&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;5. Display the data in resultwindow.js as you like to display.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; sample code for getting data from win object in resultwindow.js &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;var win = Ti.UI.currentWindow;&amp;nbsp; &lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;/&lt;/span&gt;/you should write this line at first in resultwindow.js&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; var iname=win.iname; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;6. Go to Runas and select android Emulator &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Thank you...... &lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/450300145466385720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2012/10/simple-tweets-search-app-using-titanium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/450300145466385720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/450300145466385720'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2012/10/simple-tweets-search-app-using-titanium.html' title='Simple tweets search app using Titanium'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2775741392389922276.post-5272171753970180423</id><published>2012-08-27T03:14:00.000-07:00</published><updated>2013-06-24T03:56:53.375-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Titanium Inroduction"/><title type='text'>Appcelerator Titanium Introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { margin: 2cm }
  P { margin-bottom: 0.21cm }
  A:link { color: #0000ff }
 &lt;/style&gt;
 &lt;br /&gt;
--&amp;gt;

&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Creating Titanium Mobile Project&lt;/b&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Open Appcelerator Titanium Studio&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
select or create workspace click
 ok&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
File &lt;span style=&quot;font-family: Wingdings;&quot;&gt;--&amp;gt;&lt;/span&gt;New--&amp;gt;Titanium
 Mobile Project&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Give Appname and AppID and click
 Finish&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-bottom: 0cm; margin-left: 0.5cm;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Basic things should be known….
Before we start&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
The Titanium Mobile Project folder
contains following necessary files. You should be known those files
and its purpose.&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Resource Folder&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Folders for each target platform
  (eg. Android, iPhone)&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
App.js&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Build.log&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
CHANGELOG.txt&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
License&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
License.txt&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Readme&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Manifest&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Tiapp.xml&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Resource Folder&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt; &lt;/b&gt;Resource folder contains all of
your project resources in specific folders. For example  each
targeted platform of your mobile apps have separate folders and you
can place your source and images on that folders.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;App.js&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
This is “Start Point” of your app.
This means it act as Main function of your app (eg. Main() in c, cpp
and java). you’re going to put your code here. Start by editing your
application&#39;s &lt;b&gt;app.js&lt;/b&gt; to make your first mobile project using
Titanium&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Build.log&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
This file save the log information
whenever your build your project in a particular system. And you must
delete it before you are deploy into mobile device or try to run in
another system.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;CHANGELOG.txt&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
Place your change log text here.  This
file will be incorporated with your app at package time.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;License&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
copyright 2008-2012
Appcelerator, Inc.  Licensed under the Apache License, Version 2.0
(the &quot;License&quot;);   you may not use this file except in
compliance with the License.   You may obtain a copy of the License
at      &lt;span style=&quot;color: blue;&quot;&gt;&lt;u&gt;&lt;a href=&quot;http://www.apache.org/licenses/LICENSE-2.0&quot;&gt;http://www.apache.org/licenses/LICENSE-2.0&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;License.txt&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
Place your license text
here.  This file will be incorporated with your app at package time.&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Manifest&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
It contains basic
information about your project such as appname, appid, publisher…
etc..&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Readme&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
You can put the user
instruction about running your project such as pre-requisites
and user manual.&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Tiapp.xml&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt; &lt;/b&gt;This is a
configuration file. It have basic configuration information in xml
format. You add/remove your own configuration here. Be careful while
you’re editing this file it causes error if you do wrong with this
file. For example if you think your app only run in landscape not in
portrait then you can set it in tiapp.xml. (Don’t worries we will
see later how do that).&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Now let start the
coding…&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
Wait…. Where you are
starting to write code…….?  That’s right open &lt;b&gt;app.js&lt;/b&gt;
file.&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
app.js file not an empty…
it have some predefined coding… In app.js by default they created
one tapgroub, two tabs, two windows and two labels. First, you just
try to understand those coding.&amp;nbsp;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Trace the coding:&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { margin: 2cm }
  P { margin-bottom: 0.21cm }
 &lt;/style&gt;
 --&amp;gt;

&lt;br /&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Tab
group is container object that holds an many no of tabs.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Now
look at the hierachy of the colntrols...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;label
added into window&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;window
object added in tab object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;tab
added into tabgroup...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; style=&quot;width: 410px;&quot;&gt;
 &lt;colgroup&gt;&lt;col width=&quot;400&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr&gt;
  &lt;td height=&quot;603&quot; valign=&quot;TOP&quot; width=&quot;400&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { margin: 2cm }
  P { margin-bottom: 0.21cm }
 &lt;/style&gt;
 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
--&amp;gt;

&lt;br /&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;font-weight: normal; margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;//
this sets the background color of UIView&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;font-weight: normal; margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Titanium.UI.setBackgroundColor(&#39;#000&#39;);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;//
create tab group&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;&lt;b&gt;var
tabGroup = Titanium.UI.createTabGroup();&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;//create
window object&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;var
win1 = Titanium.UI.createWindow({  &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;   
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;title:&#39;Tab
1&#39;,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;   
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;backgroundColor:&#39;#fff&#39;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;});&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;//create
tab object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;var
tab1 = Titanium.UI.createTab({  &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;   
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;icon:&#39;KS_nav_views.png&#39;,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;   
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;title:&#39;Tab
1&#39;,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;   
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;window:win1
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;//add
window object to tab here&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;});&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;//create
a label object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;var
label1 = Titanium.UI.createLabel({&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt; color:&#39;#999&#39;,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt; text:&#39;I
am Window 1&#39;,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt; font:{fontSize:20,fontFamily:&#39;Helvetica
Neue&#39;},&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt; textAlign:&#39;center&#39;,&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt; width:&#39;auto&#39;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;});
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;win1.add(label1);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;
// add label into window&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;tabGroup.addTab(tab1);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;i&gt;//  add
tabs&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0.35cm;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;b&gt;tabGroup.open();&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;i&gt;// open
tab group&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0cm; text-decoration: none;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;similarly
we can create and add many tabs in tabgroup. Now the testing time.
Run your code.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;
&lt;b&gt;Run the project in
Android Emulator&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;JUSTIFY&quot; style=&quot;margin-bottom: 0.35cm;&quot;&gt;
Go to Run &lt;span style=&quot;font-family: Wingdings;&quot;&gt;--&amp;gt;&lt;/span&gt;
run as--&amp;gt; Android Emulator&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnappcelerator.blogspot.com/feeds/5272171753970180423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnappcelerator.blogspot.com/2012/08/appcelerator-titanium-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/5272171753970180423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2775741392389922276/posts/default/5272171753970180423'/><link rel='alternate' type='text/html' href='http://learnappcelerator.blogspot.com/2012/08/appcelerator-titanium-introduction.html' title='Appcelerator Titanium Introduction'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12140209513618196122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>