2010-05-24

Views that can be used along with RemoteViews

Views must be annotated RemoteView in order to be used in the layout file inflated by LayoutInflater. Look into source code of RemoteViews. You can find an interface that is used to do annotation.
@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
public @interface RemoteView {
}

And, for views that supports RemoteViews have RemoteView annotation in the beginning of their class definition. For example,
@RemoteView
public class LinearLayout extends ViewGroup {
 // ...
}

In the latest Android source, views that supports RemoteViews are,
AbsoluteLayout.java:40:@RemoteView
AnalogClock.java:39:@RemoteView
Button.java:58:@RemoteView
Chronometer.java:45:@RemoteView
FrameLayout.java:47:@RemoteView
ImageButton.java:71:@RemoteView
ImageView.java:55:@RemoteView
LinearLayout.java:44:@RemoteView
ProgressBar.java:123:@RemoteView
RelativeLayout.java:66:@RemoteView
TextView.java:186:@RemoteView
ViewFlipper.java:38:@RemoteView