diff options
| author | John Hoford <hoford@google.com> | 2013-02-08 14:37:35 -0800 |
|---|---|---|
| committer | John Hoford <hoford@google.com> | 2013-02-08 14:53:46 -0800 |
| commit | 8029c8567a162eb66fe54255bdeae264d594278d (patch) | |
| tree | c685fedd749640111b83e944a4b0fad209232712 | |
| parent | 6d088c527485fb098833f8868a93bacd7d372443 (diff) | |
| download | android_packages_apps_Gallery2-8029c8567a162eb66fe54255bdeae264d594278d.tar.gz android_packages_apps_Gallery2-8029c8567a162eb66fe54255bdeae264d594278d.tar.bz2 android_packages_apps_Gallery2-8029c8567a162eb66fe54255bdeae264d594278d.zip | |
remove slider from FX and Border UI
Change-Id: Ic1c38734c4351ab0150b90d5d4fc575cce9db9e9
6 files changed, 64 insertions, 24 deletions
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml index e4756ab81..4417cf607 100644 --- a/res/layout/filtershow_activity.xml +++ b/res/layout/filtershow_activity.xml @@ -112,25 +112,6 @@ android:layout_height="wrap_content" android:visibility="gone" /> - <com.android.gallery3d.filtershow.CenteredLinearLayout - xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal|bottom" - android:background="@android:color/transparent" - custom:max_width="600dip" - android:orientation="vertical"> - - <SeekBar - android:id="@+id/filterSeekBar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" - android:padding="16dip" - android:visibility="gone" /> - - </com.android.gallery3d.filtershow.CenteredLinearLayout> - <ProgressBar android:id="@+id/loading" style="@android:style/Widget.Holo.ProgressBar.Large" diff --git a/res/values/filtershow_ids.xml b/res/values/filtershow_ids.xml index c444fba78..a6d223b1f 100644 --- a/res/values/filtershow_ids.xml +++ b/res/values/filtershow_ids.xml @@ -38,4 +38,5 @@ <item type="id" name="imageCurves" /> <item type="id" name="imageZoom" /> <item type="id" name="editorDraw" /> + <item type="id" name="imageOnlyEditor" /> </resources> diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 1b7408f62..051ffaf4a 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -64,6 +64,7 @@ import com.android.gallery3d.filtershow.cache.ImageLoader; import com.android.gallery3d.filtershow.editors.BasicEditor; import com.android.gallery3d.filtershow.editors.EditorDraw; import com.android.gallery3d.filtershow.editors.EditorManager; +import com.android.gallery3d.filtershow.editors.ImageOnlyEditor; import com.android.gallery3d.filtershow.filters.*; import com.android.gallery3d.filtershow.imageshow.ImageCrop; import com.android.gallery3d.filtershow.imageshow.ImageDraw; @@ -223,6 +224,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, mEditorPlaceHolder.setContainer((FrameLayout) findViewById(R.id.editorContainer)); mEditorPlaceHolder.addEditor(new EditorDraw()); mEditorPlaceHolder.addEditor(new BasicEditor()); + mEditorPlaceHolder.addEditor(new ImageOnlyEditor()); EditorManager.addEditors(mEditorPlaceHolder); mEditorPlaceHolder.setOldViews(mImageViews); mEditorPlaceHolder.setImageLoader(mImageLoader); @@ -305,11 +307,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, LoadBordersTask loadBorders = new LoadBordersTask(listBorders); loadBorders.execute(); - SeekBar seekBar = (SeekBar) findViewById(R.id.filterSeekBar); - seekBar.setMax(SEEK_BAR_MAX); - - mImageShow.setSeekBar(seekBar); - mImageTinyPlanet.setSeekBar(seekBar); mPanelController.setRowPanel(findViewById(R.id.secondRowPanel)); mPanelController.setUtilityPanel(this, findViewById(R.id.filterButtonsList), findViewById(R.id.panelAccessoryViewList), diff --git a/src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java b/src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java new file mode 100644 index 000000000..a3fc5aab4 --- /dev/null +++ b/src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.gallery3d.filtershow.editors; + +import android.content.Context; +import android.widget.FrameLayout; + +import com.android.gallery3d.R; +import com.android.gallery3d.filtershow.imageshow.ImageShow; + +/** + * The editor with no slider for filters without UI + */ +public class ImageOnlyEditor extends Editor { + public static int ID = R.id.imageOnlyEditor; + private final String LOGTAG = "ImageOnlyEditor"; + + public ImageOnlyEditor() { + super(ID); + } + + protected ImageOnlyEditor(int id) { + super(id); + } + + @Override + public void createEditor(Context context, FrameLayout frameLayout) { + super.createEditor(context, frameLayout); + mView = mImageShow = new ImageShow(context); + } + +} diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java index 200bcf153..16e491b89 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java @@ -25,6 +25,7 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import com.android.gallery3d.R; +import com.android.gallery3d.filtershow.editors.ImageOnlyEditor; import java.util.HashMap; @@ -55,6 +56,12 @@ public class ImageFilterBorder extends ImageFilter { } @Override + public int getEditingViewId() { + return ImageOnlyEditor.ID; + } + + @Override + public boolean showParameterValue() { return false; } diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java index 2fa4cfb16..ebc08f0b4 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java @@ -18,6 +18,9 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; +import com.android.gallery3d.filtershow.editors.BasicEditor; +import com.android.gallery3d.filtershow.editors.ImageOnlyEditor; + public class ImageFilterFx extends ImageFilter { private static final String TAG = "ImageFilterFx"; Bitmap fxBitmap; @@ -57,6 +60,11 @@ public class ImageFilterFx extends ImageFilter { } @Override + public int getEditingViewId() { + return ImageOnlyEditor.ID; + } + + @Override public boolean showParameterValue() { return false; } |
