diff options
author | nicolasroard <nicolasroard@google.com> | 2013-08-10 17:23:38 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2013-08-10 17:23:38 -0700 |
commit | 1a1cb07982f574a59cd84b0501770da97accad89 (patch) | |
tree | 2cb5db4601f1bcacdddafe8714a74db78b4e7ffc | |
parent | 0786afd7628be6668a2658290ec07785fbc64921 (diff) | |
download | android_packages_apps_Gallery2-1a1cb07982f574a59cd84b0501770da97accad89.tar.gz android_packages_apps_Gallery2-1a1cb07982f574a59cd84b0501770da97accad89.tar.bz2 android_packages_apps_Gallery2-1a1cb07982f574a59cd84b0501770da97accad89.zip |
Fix crash and missing content
Change-Id: I477599491921fc4319834f32d5806cdc165679e6
-rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 3 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/state/StatePanel.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 7e15bf143..2912f6891 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -231,7 +231,6 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL ImageFilter.setActivityForMemoryToasts(this); mUserPresetsManager = new UserPresetsManager(this); mUserPresetsAdapter = new UserPresetsAdapter(this); - mCategoryLooksAdapter = new CategoryAdapter(this); } public void updateUIAfterServiceStarted() { @@ -1004,7 +1003,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL FiltersManager filtersManager = FiltersManager.getManager(); ArrayList<FilterRepresentation> filtersRepresentations = filtersManager.getLooks(); - mCategoryLooksAdapter.clear(); + mCategoryLooksAdapter = new CategoryAdapter(this); int verticalItemHeight = (int) getResources().getDimension(R.dimen.action_item_height); mCategoryLooksAdapter.setItemHeight(verticalItemHeight); for (FilterRepresentation representation : filtersRepresentations) { diff --git a/src/com/android/gallery3d/filtershow/state/StatePanel.java b/src/com/android/gallery3d/filtershow/state/StatePanel.java index 044c2b4a2..d65a77260 100644 --- a/src/com/android/gallery3d/filtershow/state/StatePanel.java +++ b/src/com/android/gallery3d/filtershow/state/StatePanel.java @@ -50,7 +50,7 @@ public class StatePanel extends Fragment { mToggleVersionsPanel = (ImageButton) mMainView.findViewById(R.id.toggleVersionsPanel); if (mMainPanel != null) { mMainPanel.setToggleVersionsPanelButton(mToggleVersionsPanel); - } else { + } else if (mToggleVersionsPanel != null) { mToggleVersionsPanel.setVisibility(View.GONE); } return mMainView; |