fix grad filter brightness value stuck at -100
Change-Id: I8e0fa1e0b9537fc530fecb78aac019c220af7ae2
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorGrad.java b/src/com/android/gallery3d/filtershow/editors/EditorGrad.java
index 4be435f..80c4303 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorGrad.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorGrad.java
@@ -191,13 +191,13 @@
public ParamAdapter(int seekId, int textId, LinearLayout layout, int mode) {
mSlider = (SeekBar) layout.findViewById(seekId);
mTextView = (TextView) layout.findViewById(textId);
- mSlider.setOnSeekBarChangeListener(this);
mSlider.setMax(mMax - mMin);
mMode = mode;
FilterGradRepresentation rep = getGradRepresentation();
if (rep != null){
updateValues(rep);
}
+ mSlider.setOnSeekBarChangeListener(this);
}
public void updateValues(FilterGradRepresentation rep) {
@@ -428,5 +428,4 @@
public void copyFrom(Parameter src) {
}
-
}
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterGradRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterGradRepresentation.java
index 354fa59..a3a7e95 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterGradRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterGradRepresentation.java
@@ -114,7 +114,7 @@
p.yPos1 = 100;
p.xPos2 = -1;
p.yPos2 = 100;
- p.brightness = 40;
+ p.brightness = -50;
p.contrast = 0;
p.saturation = 0;
mBands.add(0, p);