OSDN Git Service
Add palette variations of widgets
This changeset adds new items to the palette which are just variations
of an existing widget but with different initial attributes. In
particular:
* Instead of just LinearLayout there are two versions of it:
LinearLayout (Vertical) and LinearLayout (Horizontal)
* The ProgressBar has 3 variations: Large, Small, and Horizontal. The
horizontal ProgressBar looks like the SeekBar, without at thumb, so
the SeekBar is moved next to the progress bar.
* There is a new palette category, "Text Fields", which contains a
number of different initializations of the EditText's "inputType"
attribute - for textual and numeric passwords, for names and e-mail
and postal addresses, for phone numbers, for negative and decimal
numbers, etc.
* Since LinearLayout is so common, the outline handles it specially to
ensure that we show a horizontal or a vertical icon depending on the
orientation attribute of the specific element rather than the
generic descriptor icon.
There are various changes to the palette icon preview and drag preview
etc to handle these changes. In particular, the category
initialization code had to be rewritten to be able to handle
variations (since for example the text field appears in multiple
categories, so the old assumption that each view had an assigned
category was no longer true.)
This changeset also extracts a constant for the "android:" literal
used in many places in the code, and renames the existing "android"
namespace constant.
Change-Id: Ibbc3dbd34c551594421c3de034cdccea6a66eba0
23 files changed: