x
Loading
 Loading
Join 10,000+ Fans Join 5,000+ Followers Join 1,000+ Members Join 10,000+ Subscribers Subscribe to Daily Updates
Follow linuxdlsazine
Hello, Guest | Login | Register

Dumping WYSIWYG: Building Android User Interfaces at Run Time

A look at an alternative means of constructing user interface elements for Android developers

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.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Exploring the ListField, Part 2
  2. Exploring the ListField, Part 1
  3. Color in Your Cheeks: Brighten Up BlackBerry Apps
  4. The Mobile Plot Thickens: The BlackBerry Tablet
  5. From Zero to Mobile Inventor in 10 Minutes
Comments
Downloads
BlackBerry
The CIO's Guide to Mobile Security
M86 Security
Real Time Code Analysis: Proactive Protection Against Malware Threats
Raritan
Measuring Power in Your Data Center
Astaro
Astaro Outperforms Cisco as an Integrated Security Solution at Devine Millimet
Columns
Ken Hess on
Systems
Joe Brockmeier on
Software
Frank Ableson on
Mobile
Jeffrey Layton on
Storage
Douglas Eadline on
HPC
Chris Smart on
Distros