diff options
author | nicolasroard <nicolasroard@google.com> | 2013-02-13 00:09:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-13 00:09:32 +0000 |
commit | a52d6674e576a15d1c3f71f951fa3843957bfa8b (patch) | |
tree | 797ab09765fdccf7e20b66331bf3bd4353883cde /src/com/android/gallery3d/filtershow | |
parent | dff54430a7f6a11dc8ef45496f2836a853bd6d42 (diff) | |
parent | 66b293e3d57988899a7fd5f1883e15f9d74b4a93 (diff) | |
download | android_packages_apps_Snap-a52d6674e576a15d1c3f71f951fa3843957bfa8b.tar.gz android_packages_apps_Snap-a52d6674e576a15d1c3f71f951fa3843957bfa8b.tar.bz2 android_packages_apps_Snap-a52d6674e576a15d1c3f71f951fa3843957bfa8b.zip |
Merge "Turn back on the state panel" into gb-ub-photos-bryce
Diffstat (limited to 'src/com/android/gallery3d/filtershow')
4 files changed, 13 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/filtershow/ImageStateAdapter.java b/src/com/android/gallery3d/filtershow/ImageStateAdapter.java index 5de96961c..58e0035bc 100644 --- a/src/com/android/gallery3d/filtershow/ImageStateAdapter.java +++ b/src/com/android/gallery3d/filtershow/ImageStateAdapter.java @@ -24,9 +24,10 @@ import android.widget.ArrayAdapter; import android.widget.TextView; import com.android.gallery3d.R; +import com.android.gallery3d.filtershow.filters.FilterRepresentation; import com.android.gallery3d.filtershow.filters.ImageFilter; -public class ImageStateAdapter extends ArrayAdapter<ImageFilter> { +public class ImageStateAdapter extends ArrayAdapter<FilterRepresentation> { private static final String LOGTAG = "ImageStateAdapter"; public ImageStateAdapter(Context context, int textViewResourceId) { @@ -41,13 +42,12 @@ public class ImageStateAdapter extends ArrayAdapter<ImageFilter> { Context.LAYOUT_INFLATER_SERVICE); view = inflater.inflate(R.layout.filtershow_imagestate_row, null); } - ImageFilter filter = getItem(position); + FilterRepresentation filter = getItem(position); if (filter != null) { TextView itemLabel = (TextView) view.findViewById(R.id.imagestate_label); itemLabel.setText(filter.getName()); TextView itemParameter = (TextView) view.findViewById(R.id.imagestate_parameter); - // TODO: fix the image state adapter - // itemParameter.setText("" + filter.getParameter()); + itemParameter.setText(filter.getStateRepresentation()); } return view; } diff --git a/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java index f6f308dba..2410ebe72 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java @@ -121,4 +121,8 @@ public class FilterBasicRepresentation extends FilterRepresentation { public void setPreviewValue(int previewValue) { mPreviewValue = previewValue; } + + public String getStateRepresentation() { + return "" + getValue(); + } } diff --git a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java index 2b6c3fe7d..0aa449303 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java @@ -186,4 +186,8 @@ public class FilterRepresentation implements Cloneable { public void setShowUtilityPanel(boolean showUtilityPanel) { mShowUtilityPanel = showUtilityPanel; } + + public String getStateRepresentation() { + return ""; + } } diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java index b81659a1a..0582b34bc 100644 --- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java +++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java @@ -425,7 +425,7 @@ public class ImagePreset { } imageStateAdapter.clear(); // TODO: re-enable the state panel - // imageStateAdapter.addAll(mFilters); + imageStateAdapter.addAll(mFilters); imageStateAdapter.notifyDataSetChanged(); } |