summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-04-29 07:30:33 -0700
committerJohn Hoford <hoford@google.com>2013-04-29 14:29:25 -0700
commit027c2681e8075dda5c83088532ac1f55d20130fd (patch)
treef57eb463985563af64bb27dd5a0e96c771fab02e /src/com
parent31eef2d6d3e4c72bf168b931c5123ed739401b99 (diff)
downloadandroid_packages_apps_Snap-027c2681e8075dda5c83088532ac1f55d20130fd.tar.gz
android_packages_apps_Snap-027c2681e8075dda5c83088532ac1f55d20130fd.tar.bz2
android_packages_apps_Snap-027c2681e8075dda5c83088532ac1f55d20130fd.zip
small ui changes based on UX/PM feedback
bug:8664728 Change-Id: I4e0651c011b9a6c4742d86c898a0821187f43043
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java3
-rw-r--r--src/com/android/gallery3d/filtershow/controller/TitledSlider.java4
-rw-r--r--src/com/android/gallery3d/filtershow/editors/BasicEditor.java1
-rw-r--r--src/com/android/gallery3d/filtershow/editors/Editor.java2
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorStraighten.java2
-rw-r--r--src/com/android/gallery3d/filtershow/editors/ParametricEditor.java6
-rw-r--r--src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java4
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java3
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterImageBorderRepresentation.java2
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java44
10 files changed, 43 insertions, 28 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 56680b012..d26a58a34 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -730,7 +730,8 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
}
private void fillFx() {
- FilterFxRepresentation nullFx = new FilterFxRepresentation(getString(R.string.none), 0, R.string.none);
+ FilterFxRepresentation nullFx =
+ new FilterFxRepresentation(getString(R.string.none), 0, R.string.none);
Vector<FilterRepresentation> filtersRepresentations = new Vector<FilterRepresentation>();
FiltersManager.getManager().addLooks(this, filtersRepresentations);
diff --git a/src/com/android/gallery3d/filtershow/controller/TitledSlider.java b/src/com/android/gallery3d/filtershow/controller/TitledSlider.java
index cbaa48923..f29442bb9 100644
--- a/src/com/android/gallery3d/filtershow/controller/TitledSlider.java
+++ b/src/com/android/gallery3d/filtershow/controller/TitledSlider.java
@@ -87,8 +87,8 @@ public class TitledSlider implements Control {
@Override
public void updateUI() {
- if (mControlName != null) {
- mControlName.setText(mParameter.getParameterName());
+ if (mControlName != null && mParameter.getParameterName() != null) {
+ mControlName.setText(mParameter.getParameterName().toUpperCase());
}
if (mControlValue != null) {
mControlValue.setText(
diff --git a/src/com/android/gallery3d/filtershow/editors/BasicEditor.java b/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
index 44296e2ef..af694d811 100644
--- a/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
+++ b/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
@@ -51,6 +51,7 @@ public class BasicEditor extends ParametricEditor implements ParameterInteger {
super.reflectCurrentFilter();
if (getLocalRepresentation() != null && getLocalRepresentation() instanceof FilterBasicRepresentation) {
FilterBasicRepresentation interval = (FilterBasicRepresentation) getLocalRepresentation();
+ updateText();
}
}
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java
index b543750f3..e760ae58c 100644
--- a/src/com/android/gallery3d/filtershow/editors/Editor.java
+++ b/src/com/android/gallery3d/filtershow/editors/Editor.java
@@ -60,7 +60,7 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis
public static byte SHOW_VALUE_INT = 1;
public String calculateUserMessage(Context context, String effectName, Object parameterValue) {
- return effectName + " " + parameterValue;
+ return effectName.toUpperCase() + " " + parameterValue;
}
protected Editor(int id) {
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
index 4c071dc69..dbc6ca05d 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
@@ -40,7 +40,7 @@ public class EditorStraighten extends Editor implements EditorInfo {
public String calculateUserMessage(Context context, String effectName, Object parameterValue) {
String apply = context.getString(R.string.apply_effect);
apply += " " + effectName;
- return apply;
+ return apply.toUpperCase();
}
@Override
diff --git a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
index 02a1c7145..c23b90b33 100644
--- a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
+++ b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
@@ -93,12 +93,12 @@ public class ParametricEditor extends Editor {
if (mShowParameter == SHOW_VALUE_INT & useCompact(context)) {
if (getLocalRepresentation() instanceof FilterBasicRepresentation) {
FilterBasicRepresentation interval = (FilterBasicRepresentation) getLocalRepresentation();
- apply += " " + effectName + " " + interval.getStateRepresentation();
+ apply += " " + effectName.toUpperCase() + " " + interval.getStateRepresentation();
} else {
- apply += " " + effectName + " " + parameterValue;
+ apply += " " + effectName.toUpperCase() + " " + parameterValue;
}
} else {
- apply += " " + effectName;
+ apply += " " + effectName.toUpperCase();
}
return apply;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
index ec9a4368c..9927a0a5e 100644
--- a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
+++ b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
@@ -99,7 +99,7 @@ public abstract class BaseFiltersManager {
filters.add(ImageFilterVibrance.class);
filters.add(ImageFilterSharpen.class);
filters.add(ImageFilterCurves.class);
- filters.add(ImageFilterDraw.class);
+ // filters.add(ImageFilterDraw.class);
filters.add(ImageFilterHue.class);
filters.add(ImageFilterSaturated.class);
filters.add(ImageFilterBwFilter.class);
@@ -169,7 +169,7 @@ public abstract class BaseFiltersManager {
public void addTools(Vector<FilterRepresentation> representations) {
//representations.add(getRepresentation(ImageFilterRedEye.class));
- representations.add(getRepresentation(ImageFilterDraw.class));
+ // representations.add(getRepresentation(ImageFilterDraw.class));
}
public void setFilterResources(Resources resources) {
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java
index 3ef1e09ed..28ccf7d8f 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterBasicRepresentation.java
@@ -135,7 +135,8 @@ public class FilterBasicRepresentation extends FilterRepresentation implements P
@Override
public String getStateRepresentation() {
- return "" + getValue();
+ int val = getValue();
+ return ((val > 0) ? "+" : "") + val;
}
@Override
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterImageBorderRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterImageBorderRepresentation.java
index 5257e7793..f67254c63 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterImageBorderRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterImageBorderRepresentation.java
@@ -70,7 +70,7 @@ public class FilterImageBorderRepresentation extends FilterRepresentation {
@Override
public int getTextId() {
- return R.string.borders;
+ return R.string.none;
}
public boolean allowsMultipleInstances() {
diff --git a/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java b/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java
index a3296779e..e334fc9f4 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java
@@ -46,6 +46,7 @@ public class EclipseControl {
private float mDownRadiusY;
private Matrix mScrToImg;
+ private boolean mShowReshapeHandles = true;
public final static int HAN_CENTER = 0;
public final static int HAN_NORTH = 7;
public final static int HAN_NE = 8;
@@ -57,7 +58,7 @@ public class EclipseControl {
public final static int HAN_NW = 6;
public EclipseControl(Context context) {
- mSliderColor = context.getResources().getColor(R.color.slider_line_color);
+ mSliderColor = Color.WHITE;
}
public void setRadius(float x, float y) {
@@ -215,29 +216,36 @@ public class EclipseControl {
canvas.drawOval(rect, paint);
float da = 4;
float arclen = da + da;
- for (int i = 0; i < 361; i += 90) {
- float dx = rx + 10;
- float dy = ry + 10;
- rect.left = cx - dx;
- rect.top = cy - dy;
- rect.right = cx + dx;
- rect.bottom = cy + dy;
- canvas.drawArc(rect, i - da, arclen, false, paint);
- dx = rx - 10;
- dy = ry - 10;
- rect.left = cx - dx;
- rect.top = cy - dy;
- rect.right = cx + dx;
- rect.bottom = cy + dy;
- canvas.drawArc(rect, i - da, arclen, false, paint);
+ if (mShowReshapeHandles) {
+ paint.setStyle(Paint.Style.STROKE);
+
+ for (int i = 0; i < 361; i += 90) {
+ float dx = rx + 10;
+ float dy = ry + 10;
+ rect.left = cx - dx;
+ rect.top = cy - dy;
+ rect.right = cx + dx;
+ rect.bottom = cy + dy;
+ canvas.drawArc(rect, i - da, arclen, false, paint);
+ dx = rx - 10;
+ dy = ry - 10;
+ rect.left = cx - dx;
+ rect.top = cy - dy;
+ rect.right = cx + dx;
+ rect.bottom = cy + dy;
+ canvas.drawArc(rect, i - da, arclen, false, paint);
+ }
}
da *= 2;
+ paint.setStyle(Paint.Style.FILL);
+
for (int i = 45; i < 361; i += 90) {
double angle = Math.PI * i / 180.;
float x = cx + (float) (rx * Math.cos(angle));
float y = cy + (float) (ry * Math.sin(angle));
canvas.drawRect(x - da, y - da, x + da, y + da, paint);
}
+ paint.setStyle(Paint.Style.STROKE);
rect.left = cx - rx;
rect.top = cy - ry;
rect.right = cx + rx;
@@ -270,4 +278,8 @@ public class EclipseControl {
public boolean isUndefined() {
return Float.isNaN(mCenterX);
}
+
+ public void setShowReshapeHandles(boolean showReshapeHandles) {
+ this.mShowReshapeHandles = showReshapeHandles;
+ }
}