Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 26: Exploring List Widgets > A Quick Note on Remote Views

A Quick Note on Remote Views

The class RemoteViews can’t be constructed by passing explicit view objects. Nor can view objects be directly added to RemoteViews. Instead, you construct a RemoteViews object by passing a layout file to its constructor. As of 4.0, only the following views are allowed to be in these layout files

  • FrameLayout
  • LinearLayout
  • RelativeLayout
  • AnalogClock
  • Button
  • Chronometer
  • ImageButton
  • ProgressBar
  • ListView
  • GridView
  • StackView
  • TextView
  • DateTimeView
  • ImageView
  • AdapterViewFlipper
  • ViewFlipper

More remote views may be added in future releases. The key to finding out which of the current UI objects are enabled for RemoteViews is the fact that these classes are annotated with an interface called RemoteViews.RemoteView.

Armed with this information, you can use Eclipse to figure out which classes in a project use this annotation. Here’s how you do it:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint