diff options
author | John Reck <jreck@google.com> | 2011-05-19 10:09:26 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-05-19 15:24:50 -0700 |
commit | e74d9f8e84c8b5dfdbc3dd0d689d01d945841100 (patch) | |
tree | bb623404846b129b4a6458b4765a47f405538c78 /src/com/android/browser/view | |
parent | fd0deff448732187e19a4ee912bed8b47d921828 (diff) | |
download | android_packages_apps_Gello-e74d9f8e84c8b5dfdbc3dd0d689d01d945841100.tar.gz android_packages_apps_Gello-e74d9f8e84c8b5dfdbc3dd0d689d01d945841100.tar.bz2 android_packages_apps_Gello-e74d9f8e84c8b5dfdbc3dd0d689d01d945841100.zip |
Replace hack with new framework support
Change-Id: I62abc855fd4db18e17415c86e9b791b1710abd2f
Diffstat (limited to 'src/com/android/browser/view')
-rw-r--r-- | src/com/android/browser/view/BookmarkExpandableGridView.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/com/android/browser/view/BookmarkExpandableGridView.java b/src/com/android/browser/view/BookmarkExpandableGridView.java index 800f6d95..2cf4a651 100644 --- a/src/com/android/browser/view/BookmarkExpandableGridView.java +++ b/src/com/android/browser/view/BookmarkExpandableGridView.java @@ -240,16 +240,11 @@ public class BookmarkExpandableGridView extends ExpandableListView @Override public void onClick(View v) { int groupPosition = (Integer) v.getTag(R.id.group_position); - // This little trick gets the built in smooth scroll when - // expanding a group that a call to expandGroup will not - int flatPos = 0; - for (int i = 0; i < groupPosition; i++) { - if (isGroupExpanded(i)) { - flatPos += mAdapter.getChildrenCount(i); - } - flatPos++; + if (isGroupExpanded(groupPosition)) { + collapseGroup(groupPosition); + } else { + expandGroup(groupPosition, true); } - performItemClick(v, flatPos, 0); } }; |