summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-08-05 15:07:14 -0700
committerJohn Hoford <hoford@google.com>2013-08-09 18:00:36 -0700
commit0786afd7628be6668a2658290ec07785fbc64921 (patch)
treecdae4b240f8eb0da1e92c3a3b31fbdcb4a373c5a
parent9071438baef1705413c756132493f148e19ae046 (diff)
downloadandroid_packages_apps_Gallery2-0786afd7628be6668a2658290ec07785fbc64921.tar.gz
android_packages_apps_Gallery2-0786afd7628be6668a2658290ec07785fbc64921.tar.bz2
android_packages_apps_Gallery2-0786afd7628be6668a2658290ec07785fbc64921.zip
fix draw part 2
Change-Id: Ib508cf5fd75403e5a36168255bf3613526436428
-rw-r--r--res/layout/filtershow_brightness.xml31
-rw-r--r--res/layout/filtershow_hue.xml31
-rw-r--r--res/layout/filtershow_opacity.xml31
-rw-r--r--res/layout/filtershow_saturation.xml31
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorDraw.java3
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java4
6 files changed, 128 insertions, 3 deletions
diff --git a/res/layout/filtershow_brightness.xml b/res/layout/filtershow_brightness.xml
new file mode 100644
index 000000000..88c5d3a5b
--- /dev/null
+++ b/res/layout/filtershow_brightness.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="visible" >
+
+ <com.android.gallery3d.filtershow.colorpicker.ColorBrightnessView
+ android:id="@+id/brightnessView"
+ android:layout_width="match_parent"
+ android:layout_height="90dp"
+ android:layout_above="@+id/btnSelect" />
+
+</LinearLayout>
diff --git a/res/layout/filtershow_hue.xml b/res/layout/filtershow_hue.xml
new file mode 100644
index 000000000..48d955e40
--- /dev/null
+++ b/res/layout/filtershow_hue.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="visible" >
+
+ <com.android.gallery3d.filtershow.colorpicker.ColorHueView
+ android:id="@+id/hueView"
+ android:layout_width="match_parent"
+ android:layout_height="90dp"
+ android:layout_above="@+id/btnSelect" />
+
+</LinearLayout>
diff --git a/res/layout/filtershow_opacity.xml b/res/layout/filtershow_opacity.xml
new file mode 100644
index 000000000..8bdc429a9
--- /dev/null
+++ b/res/layout/filtershow_opacity.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="visible" >
+
+ <com.android.gallery3d.filtershow.colorpicker.ColorOpacityView
+ android:id="@+id/opacityView"
+ android:layout_width="match_parent"
+ android:layout_height="90dp"
+ android:layout_above="@+id/btnSelect" />
+
+</LinearLayout>
diff --git a/res/layout/filtershow_saturation.xml b/res/layout/filtershow_saturation.xml
new file mode 100644
index 000000000..79a00c18b
--- /dev/null
+++ b/res/layout/filtershow_saturation.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="visible" >
+
+ <com.android.gallery3d.filtershow.colorpicker.ColorSaturationView
+ android:id="@+id/saturationView"
+ android:layout_width="match_parent"
+ android:layout_height="90dp"
+ android:layout_above="@+id/btnSelect" />
+
+</LinearLayout>
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
index b42aef297..c97365120 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
@@ -92,6 +92,7 @@ public class EditorDraw extends ParametricEditor implements FilterView {
mImageDraw.setFilterDrawRepresentation(drawRep);
drawRep.getParam(FilterDrawRepresentation.PARAM_STYLE).setFilterView(this);
drawRep.setPramMode(FilterDrawRepresentation.PARAM_HUE);
+ mParameterString = mContext.getString(R.string.draw_hue);
control(drawRep.getCurrentParam(), mEditControl);
}
}
@@ -99,7 +100,7 @@ public class EditorDraw extends ParametricEditor implements FilterView {
@Override
public void openUtilityPanel(final LinearLayout accessoryViewList) {
Button view = (Button) accessoryViewList.findViewById(R.id.applyEffect);
- view.setText(mContext.getString(R.string.draw_style));
+ view.setText(mContext.getString(R.string.draw_hue));
view.setOnClickListener(new OnClickListener() {
@Override
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java
index e2abb3c4d..7eb15fc5d 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java
@@ -43,9 +43,9 @@ public class FilterDrawRepresentation extends FilterRepresentation {
public static final int PARAM_STYLE = 5;
private BasicParameterInt mParamSize = new BasicParameterInt(PARAM_SIZE, 20, 2, 300);
private BasicParameterInt mParamHue = new ParameterHue(PARAM_HUE, 0);
- private BasicParameterInt mParamBrightness = new ParameterBrightness(PARAM_BRIGHTNESS, 120);
+ private BasicParameterInt mParamBrightness = new ParameterBrightness(PARAM_BRIGHTNESS, 220);
private BasicParameterInt mParamSaturation = new ParameterSaturation(PARAM_SATURATION, 200);
- private ParameterOpacity mParamOpacity = new ParameterOpacity(PARAM_OPACITY, 120);
+ private ParameterOpacity mParamOpacity = new ParameterOpacity(PARAM_OPACITY, 200);
private BasicParameterStyle mParamStyle = new BasicParameterStyle(PARAM_STYLE, 3);
int mParamMode;
Parameter mCurrentParam = mParamSize;