Book Image

Android Development Tools for Eclipse

By : Khirulnizam Abd Rahman, Sanjay Shah
Book Image

Android Development Tools for Eclipse

By: Khirulnizam Abd Rahman, Sanjay Shah

Overview of this book

<p>The increase in Android's popularity with every passing day cannot be understated. This has resulted in a large programmer base willing to contribute to its success. Eclipse has a powerful IDE and has been adopted widely by programmers across the globe. The focus of ADT is to use existing familiar territory and ease development of Android applications. In this sense, ADT provides a one stop solution for Android application development.</p><p>Android Development Tools for Eclipse is a step-by-step guide that provides you with hands-on, practical, and to the point discussion and steps for using Eclipse tools for developing, debugging, and signing Android applications for distribution. It also teaches you to incorporate advertisements to monetize your applications. Every concept and its usage has been demonstrated in this book by implementing them via real world applications.</p><p></p><p>Android Development Tools for Eclipse starts with the installation of ADT, and then discusses important tools before guiding you through Android application development from scratch, demonstrating different concepts and implementation before finally helping you distribute your applications in the Android market. You will start the development of your first application, explore project structure, and add different widgets including multimedia ones.</p><p></p><p>You will learn everything about developing, debugging, testing, distributing, and monetizing your Android application using Eclipse ADT.</p>
Table of Contents (10 chapters)
9
Index

Assigning the widget's ID

There are basically one ImageView and three ImageButtons. To change the ImageView ID, select it and go to the widget properties on the right-side. Click on the three dots button on the Id attribute. Change the ID of the ImageView to imagenumber, as shown in the following screenshot:

Assigning the widget's ID

Changing the widget's ID through the Property window

After that, change all the IDs of all the buttons to btnprevious, btninfo, btnsound, and btnnext. Use the following table as a guide:

Widget

ID

ImageView

imagenumber

Left most button

btnprevious

Display app info

btninfo

Play sound button

btnsound

Right most button

btnnext

Finally, you will get the screen, as shown here:

Assigning the widget's ID

The whole layout design of the main activity

The following XML code is available through the XML editor in the tab activity_simple_numb3rs.xml across the Graphical Layout tab:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas...