-
Book Overview & Buying
-
Table Of Contents
Appcelerator Titanium Smartphone App Development Cookbook Second Edition
By :
With all of the technical wizardry and touchscreen goodness that are now packed into modern smartphones, it's easy to forget that their primary function is still that of a telephone—being capable of making and receiving voice calls. There may be times, however, when the user's device is not capable of performing a call for whatever reason (poor network service; lack of call functionality, that is, an iPod touch user; and so on).
In this recipe, we will attempt to make a phone call, first checking the device's capabilities, and throwing an error message when a phone call is not possible.
The complete source code for this recipe can be found in the /Chapter 11/Recipe 5 folder.
Open your app.js file, remove any existing code, and add the following:
// create root window
var win1 = Ti.UI.createWindow({
title: 'Tab 1',
backgroundColor: '#fff'
});
//create the textfield number entry to dial
var txtNumber = Ti.UI.createTextField(...
Change the font size
Change margin width
Change background colour