summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-04-09 11:46:53 -0700
committernicolasroard <nicolasroard@google.com>2013-04-09 13:29:50 -0700
commit9d042ad5d685e2316f5906072ace30c365aa26e9 (patch)
tree75a7bccb848f7c387050d957b9c9c0f3de27e042
parent753bb8aa56fff425fe16b93be368b9b236e4751f (diff)
downloadandroid_packages_apps_Snap-9d042ad5d685e2316f5906072ace30c365aa26e9.tar.gz
android_packages_apps_Snap-9d042ad5d685e2316f5906072ace30c365aa26e9.tar.bz2
android_packages_apps_Snap-9d042ad5d685e2316f5906072ace30c365aa26e9.zip
Hide the category panel when editing
Change-Id: I181ab1aa3ee27bf38a88999caf31eedc263cfe96
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java11
-rw-r--r--src/com/android/gallery3d/filtershow/PanelController.java7
2 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 81c171758..b65943279 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -133,6 +133,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
private FilterIconButton mNullBorderFilter;
private int mIconSeedSize = 140;
+ private View mImageCategoryPanel = null;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -219,6 +220,16 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
setupHistoryPanel();
setupStatePanel();
+
+ mImageCategoryPanel = findViewById(R.id.imageCategoryPanel);
+ }
+
+ public void hideCategoryPanel() {
+ mImageCategoryPanel.setVisibility(View.GONE);
+ }
+
+ public void showCategoryPanel() {
+ mImageCategoryPanel.setVisibility(View.VISIBLE);
}
public void setupHistoryPanel() {
diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java
index 6b20fe180..f29765a35 100644
--- a/src/com/android/gallery3d/filtershow/PanelController.java
+++ b/src/com/android/gallery3d/filtershow/PanelController.java
@@ -31,6 +31,7 @@ import android.util.Log;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.editors.Editor;
import com.android.gallery3d.filtershow.editors.EditorTinyPlanet;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.filters.ImageFilter;
import com.android.gallery3d.filtershow.filters.ImageFilterTinyPlanet;
@@ -369,6 +370,7 @@ public class PanelController implements OnClickListener {
HistoryAdapter adapter = MasterImage.getImage().getHistory();
int position = adapter.undo();
MasterImage.getImage().onHistoryItemClick(position);
+ mActivity.showCategoryPanel();
showPanel(mCurrentPanel);
mCurrentImage.select();
if (mCurrentEditor != null) {
@@ -586,6 +588,7 @@ public class PanelController implements OnClickListener {
}
mUtilityPanel.hideAccessoryViews();
mUtilityPanel.showMenu(false);
+
if (view instanceof FilterIconButton) {
mCurrentEditor = null;
FilterIconButton component = (FilterIconButton) view;
@@ -595,6 +598,9 @@ public class PanelController implements OnClickListener {
mUtilityPanel.setShowParameter(representation.showParameterValue());
if (representation.getEditorId() != 0) {
+ if (representation.getEditorId() != ImageOnlyEditor.ID) {
+ mActivity.hideCategoryPanel();
+ }
if (mEditorPlaceHolder.contains(representation.getEditorId())) {
mCurrentEditor = mEditorPlaceHolder.showEditor(
representation.getEditorId());
@@ -625,6 +631,7 @@ public class PanelController implements OnClickListener {
return;
}
+ mActivity.showCategoryPanel();
int id = view.getId();
if (id == EditorTinyPlanet.ID) {
mCurrentImage = showImageView(R.id.imageTinyPlanet);