Recent Changes‎ > ‎

Multiple Textfield and Layout Types

posted Mar 18, 2011, 9:40 AM by Tor Norbye
The layout editor's palette now supports "variations", different configurations of the same Android widget with varying initial attributes.

For example, the layout palette now contains both horizontal and vertical LinearLayouts. There is only one LinearLayout in Android with an orientation attribute that can be set to "horizontal" or "vertical", but with this feature you can directly drag the configuration you need:
Another use for this is the EditText widget. Your application will be easier to use if you configure an inputType on the EditText. If for example a text field is asking for a number, by setting a numeric inputType, a numeric keyboard is shown to the user. Ditto for e-mail addresses, names, phone numbers, etc. We now have a dedicated textfield category in the palette:
(There are tooltips which explains the purpose of each item here.)