" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Get Number of Rows of a TableView in Crossplatform App Using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Its very common for a developer to deal with table and its rows and to know about the number of rows present in the table. I have often faced problems related to this. Finally I got the solution which is described below. CODE BLOCK : //Define current window var currentWin = Ti.UI.currentWindow; //Define table view var dataTable = […]

Simple Augmented Reality Demo Using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Here is a simple app describing AR (Augmented Reality). This app will simply display the view shown by the device camera and when user tap on the screen, the respected coordinates will be shown on an alert message. CODE BLOCK : //Define the current window var currentWin = Ti.UI.currentWindow; //Define overlay view which will have […]

Install application exclusively on SD card in Android using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Application built using Titanium is generally large in size. So sometime it is advisible to install an app to the SD card added with the device. Titanium has ability to instruct the app installer to install te app to the SD card. Here is a way to do that. In order to that we need […]

Remove Annotations From Map In Titanium

Posted on November 23rd, 2015 by Raju Mahato

Here is a code snippet which explains how to remove annotations from mapview using Titanium. //Define the current window var currentWin = Ti.UI.currentWindow; //Define the resource directory var resDir = Ti.Filesystem.getResourcesDirectory() //Define a map var myMapView = Titanium.Map.createView({ top : 0, height : ( Ti.Platform.displayCaps.platformHeight / 4 ) * 3, //Define the height of the […]

Use Slider As A Progress Bar In Crossplatform App Using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Here is a trick to use slider as progressbar described below. CODE BLOCK : //Define current window var currentWin = Ti.UI.currentWindow; //Define a button to strat the progress var stratBtn = Ti.UI.createButton({ width : 200, height : 50, title : ‘Strat Progress’, top : 300 }); //Button added to window currentWin.add(stratBtn); //Define a slider var […]

Associate Multiple Button Menu With Android Phone Menu Button Using Titanium

Posted on November 23rd, 2015 by Raju Mahato

On Android application we can use the Android menu button to show menu items to our application. Here is a code block describing the implentation. //Define current window var currentWin = Ti.UI.currentWindow; //Define Android current activity var androidCurrentActivity = Ti.Android.currentActivity; //Creating a menu androidCurrentActivity.onCreateOptionsMenu = function(event){ //Define menu var appMenu = event.menu; //Add home item […]

Display Delete Button On A Row While Swiping That Row In A Tableview Using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Most of the times, we show item list in a tableview and it is also a common scenario for a developer to  need to edit/delete/update a row on click of that row. Here is a trick describing how to display a delete button when we swipe that row. . //Define current window var currentWin = Ti.UI.currentWindow; //Define rows for a tableview […]

Identifying File Type When Downloading It In Titanium

Posted on November 23rd, 2015 by Raju Mahato

While working with file downloading I came across a situation  where I didn’t know the file type that I am going to download but I have to take some action depending on the downloaded file type. So here is the quick tip to know the file type before saving it to a directory after downloading. […]

Carousel menu in iOS using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Some times we need to make attractive menu in our application. Carousel is one of the popular type. Here is a technique to make menu similar to carousel. Let assume the images representing the menu items are stored in images folder. CODE BLOCK : //Define the current window var currentWin = Ti.UI.currentWindow; //define the resources directory […]

Install application exclusively on SD card in Android using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Application build using Titanium is generally large in size. So sometime it is advisible to install an app to the SD card added with the device. Titanium has ability to instruc the app installer to install te app to the SD card. So here is a way to do that. In order to that we […]

Toast Notification In Android Application Using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Introduction :    Its very common in web application, where when we takes our cursor over a link or image, generally we can see a tooltip describing about the control or tells about the control. So can we do something like that on our mobile app….? Description :   Generally in web application, when we […]

Vertical Slider in IOS app using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Introduction :    Slider is a very common UI control used to select some value from a given range. And also we can use it to display a value with in a given range of values. So it is very common to those scenario. Description :   Generally slider is displayed in horizontal layout, where […]

Displaying Label In Crossplatform App Using Alloy With Titanium

Posted on November 23rd, 2015 by Raju Mahato

Introduction : Using Titanium label API with js we can easily add a label to a screen. But today we will see how could we can add a label in an application following Alloy. Alloy provides MVC architecture to make an application where we will have model view and controller. Generally view will contain the […]

Add click event to an element using Alloy with Titanium

Posted on November 23rd, 2015 by Raju Mahato

Introduction : Alloy supports MVC pattern architecture where we can have view, model and controllers by which we can separate UI block and program logic. So here we will see how can we add clock event to an UI element. Description : In order to add click event to an UI element, lets add an  […]

Displaying rows with section in table view using Alloy.

Posted on November 23rd, 2015 by Raju Mahato

Introduction : Generally table view is used to display data in different rows and its very common to have rows under sections like all the name of states will be displayed under state sections, all the name cities listed under city section. Description : Lets have a window with a table. And we will add […]

Tableview with Alloy using Titanium

Posted on November 23rd, 2015 by Raju Mahato

Introduction : Tableview is a very common UI element used to display data in table row format. It is used to display information as organised section and row format. Description : Lets have a window where we will define a table and will add few rows to it. CODE BLOCK : index.xml <Alloy> <Window backgroundColor=’red’> […]

Disable vertical bounce effect of container in scrollview in Titanium using Alloy

Posted on November 23rd, 2015 by Raju Mahato

Introduction : Usually we use scrollview to display large body of content which is  scrollable. But when a user reaches to top or bottom end of that content, it shows bounce effect to that instance. Application built with Titanium can have the feature to block this bounce effect at the top and bottom ends. Description […]