Creating the App Widget Layout

You must define an initial layout for your App Widget in XML and save it in the project's res/layout / directory. You can design your App Widget using the View objects listed below, but before you begin designing your App Widget, please read and understand the App Widget Design Guidelines.

Creating the App Widget layout is simple if you're familiar with Declaring Layout in XML. However, you must be aware that App Widget layouts are based on RemoteViews, which do not support every kind of layout or view widget.

A RemoteViews object (and, consequently, an App Widget) can support the following layout classes:

• FrameLayout

• LinearLayout

• RelativeLayout

And the following widget classes:

• AnalogClock

• Chronometer

• ImageButton

• ProgressBar

Descendants of these classes are not supported.

0 0

Post a comment