Hello, Views
This is a collection of "Hello World"-style tutorials designed to get you started quickly with common Android layouts and widgets.
A certain amount of knowledge is assumed for these tutorials. Before you start, you should have completed the Hello, World tutorial—it will teach you several things about basic Android development. More specifically, you should know:
A certain amount of knowledge is assumed for these tutorials. Before you start, you should have completed the Hello, World tutorial—it will teach you several things about basic Android development. More specifically, you should know:
- How to create an Android project and run it
- The basic structure of an Android project (resource files, layout files, etc.)
- The basic components of an
Activity
Note: In order to make these tutorials as simple as possible, some code may not conform to best practices for coding Android applications. In particular, hard-coded strings are used in places, when the better practice is to reference strings from a
res/values/strings.xml
resource file.Tip: After you have pasted sample code into an Eclipse project, press Ctrl (or Cmd) + Shift + O to import the required packages.
Layouts
Widgets & Other Views
There are plenty more layouts and widgets available. See the
View
class for more on View layouts, and the widget package
for more useful widgets. And for more raw code samples, visit the Api Demos.
No comments:
Post a Comment