From 2614c6c1f9fb19af21b901c16c443335bbc9d50b Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Thu, 4 Nov 2010 17:54:45 -0700 Subject: Fix bug 3167099 and bug 3009490 - GridView choice modes and getCheckedItemCount after orientation change Remove the restriction on choice modes for GridView - this is handled by common code in AbsListView. Persist the checked item count in saved instance state. Change-Id: Iebb964bb3c43779c082a458ea3f2754ab694b69d --- core/java/android/widget/GridView.java | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'core/java/android/widget/GridView.java') diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java index 936a97d5d60f..b963536076e3 100644 --- a/core/java/android/widget/GridView.java +++ b/core/java/android/widget/GridView.java @@ -107,26 +107,6 @@ public class GridView extends AbsListView { a.recycle(); } - /** - * Set how the user may select items from the grid. - * - *

GridView only supports {@link AbsListView#CHOICE_MODE_NONE} and - * {@link AbsListView#CHOICE_MODE_MULTIPLE_MODAL}. Attempting to set an unsupported choice - * mode will throw an UnsupportedOperationException. - */ - @Override - public void setChoiceMode(int choiceMode) { - switch (choiceMode) { - case CHOICE_MODE_NONE: - case CHOICE_MODE_MULTIPLE_MODAL: - super.setChoiceMode(choiceMode); - break; - - default: - throw new UnsupportedOperationException("Unsupported choice mode " + choiceMode); - } - } - @Override public ListAdapter getAdapter() { return mAdapter; -- cgit v1.2.3