OSDN Git Service

Fix bug 3237638 - make it easy to change a "refresh" AB button/icon
authorAdam Powell <adamp@google.com>
Mon, 24 Jan 2011 19:48:54 +0000 (11:48 -0800)
committerAdam Powell <adamp@google.com>
Mon, 24 Jan 2011 22:03:16 +0000 (14:03 -0800)
into the indeterminate progress icon

This fixes a bug that caused ActionViews to not be updated properly
after a pass through invalidateOptionsMenu/onPrepareOptionsMenu. Apps
can now set/clear action views to display progress spinner widgets or
anything else on demand.

Change-Id: I138eceb504177c6bb5b86d40a68a82973aa841a5

core/java/com/android/internal/view/menu/MenuItemImpl.java

index 6fbae94..305115f 100644 (file)
@@ -690,6 +690,7 @@ public final class MenuItemImpl implements MenuItem {
 
     public MenuItem setActionView(View view) {
         mActionView = view;
+        mMenu.onItemActionRequestChanged(this);
         return this;
     }