Dumping WYSIWYG: Building Android User Interfaces at Run Time
A look at an alternative means of constructing user interface elements for Android developers
Tuesday, February 16th, 2010
Breaking with Tradition
Developing Android applications ordinarily commences with a File -> New -> Android Project.
The new project wizard creates a simple Android application sporting a single TextView UI widget.
This UI widget is contained within a user interface file layout named main.xml.
The Android Developer Tools (ADT) include a modest WYSIWYG (What you see is what you get) layout tool that is used to work with these xml files. You know the drill: drop a new control on the screen, set properties and away you go.
As an alternative to using the WYSIWYG tools, an Android developer can edit the xml file directly. In we looked at a simple user interface to support our excursion into the Android Native Development Kit. Here is the xml used for that simple interface.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent"...
Please log in to view this content.
Read More
- Monitoring Android Events
- Wiring Up Android Buttons
- Launching Android Apps
- Complementary and Collaborative Apps
- Android Phone-Top Programming, Part 2
|