Listing 108 Using a Remote View to modify App Widget UI

// Set the image level for an ImageView.

views.setInt(, "setlmageLevel", 2); // Show the cursor of a TextView.

views.setBoolean(, "setCursorVisible", true); // Assign a bitmap to an ImageButton.

views.setBitmap(, "setlmageBitmap", myBitmap);

Remote Views also include a set of View-specific methods to set values applicable to a particular View class, including Text Views, Image Views, Progress Bars, and Chronometers.

Listing 10-9 shows examples of some of these specialist methods:

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide

Post a comment