Creating Android Apps in Java
Creating Android Apps in Java
This is a full-day tutorial in writing Android apps using the Eclipse IDE on Mac, PC, or Linux. An app is made of two parts: a screen layout written in XML (the Extensible Markup Language) and objects written in Java. Learn how these two halves of the app interact with each other. Draw text and graphics on the screen, respond to a touch or keystroke, and display controls such as buttons and sliders. An app can be divided into components called "activities", and an activity in one app can launch and communicate with an activity in another app on the same device.
We concentrate on three Android design patterns involving "views", which are visible areas on the screen. (1) A "listener" is an object whose methods are called in response to various stimuli. We plug a listener into a view to make the view touch-sensitive. (2) A "cursor" is a source of data. We plug a cursor into an "adapter", which encases each item of data in a separate view. (3) An "adapter view" displays a series of views on the screen. We plug an adapter into an adapter view to provide the series of views to be displayed.