Android Programming Tutorials

(Romina) #1
A Simple Form


  • Instead of using the console tools as documented above, try using
    Eclipse. You will need to download Eclipse, install the Android plug-


in, and use it to create your first project.



  • Try replacing the icon for your application. To do this, you will need


to find a suitable 48x48 pixel image, create a drawable/ directory
inside your res/ directory in the project, and adjust the
AndroidManifest.xml file to contain an android:icon =

"@drawable/my_icon" attribute in the application element, where
my_icon is replaced by the base name of your image file.


  • Try playing with the fonts for use in both the TextView and EditText
    widgets. The Android SDK documentation will show a number of


XML attributes you can manipulate to change the color, make the
text boldface, etc.

Further Reading...........................................................................................


You can learn more about XML layouts in the "Using XML-Based Layouts"


chapter of The Busy Coder's Guide to Android Development. Similarly, you


can learn more about simple widgets, like fields and buttons, in the


"Employing Basic Widgets" chapter of the same book, where you will also


find "Working with Containers" for container classes like LinearLayout.


17
Free download pdf