Merge "ActivityChooserView shows "see all" improperly."

This commit is contained in:
Svetoslav Ganov
2011-09-29 17:54:22 -07:00
committed by Android (Google) Code Review

View File

@@ -302,8 +302,6 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
getViewTreeObserver().addOnGlobalLayoutListener(mOnGlobalLayoutListener);
mAdapter.setMaxActivityCount(maxActivityCount);
final boolean defaultActivityButtonShown =
mDefaultActivityButton.getVisibility() == VISIBLE;
@@ -312,8 +310,10 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
if (maxActivityCount != ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED
&& activityCount > maxActivityCount + maxActivityCountOffset) {
mAdapter.setShowFooterView(true);
mAdapter.setMaxActivityCount(maxActivityCount - 1);
} else {
mAdapter.setShowFooterView(false);
mAdapter.setMaxActivityCount(maxActivityCount);
}
ListPopupWindow popupWindow = getListPopupWindow();