Merge "Add new overlay icons for sharpen and curves" into gb-ub-photos-bryce
diff --git a/res/drawable-hdpi/ic_menu_edit_holo_dark.png b/res/drawable-hdpi/ic_menu_edit_holo_dark.png
new file mode 100644
index 0000000..54952f5
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_edit_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_edit_holo_dark.png b/res/drawable-mdpi/ic_menu_edit_holo_dark.png
new file mode 100644
index 0000000..ca9188e
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_edit_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_edit_holo_dark.png b/res/drawable-xhdpi/ic_menu_edit_holo_dark.png
new file mode 100644
index 0000000..65e72c1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_edit_holo_dark.png
Binary files differ
diff --git a/res/layout-land/filtershow_editor_panel.xml b/res/layout-land/filtershow_editor_panel.xml
index 85ab010..015fa26 100644
--- a/res/layout-land/filtershow_editor_panel.xml
+++ b/res/layout-land/filtershow_editor_panel.xml
@@ -101,7 +101,8 @@
android:gravity="center"
android:text="@string/apply_effect"
android:textSize="18dip"
- android:drawableRight="@drawable/filtershow_menu_marker"/>
+ android:drawableRight="@drawable/filtershow_menu_marker"
+ android:textAllCaps="true" />
</LinearLayout>
diff --git a/res/layout/filtershow_editor_panel.xml b/res/layout/filtershow_editor_panel.xml
index ef2fb8b..a6da46a 100644
--- a/res/layout/filtershow_editor_panel.xml
+++ b/res/layout/filtershow_editor_panel.xml
@@ -85,7 +85,8 @@
android:gravity="center"
android:text="@string/apply_effect"
android:textSize="18dip"
- android:drawableRight="@drawable/filtershow_menu_marker"/>
+ android:drawableRight="@drawable/filtershow_menu_marker"
+ android:textAllCaps="true" />
</LinearLayout>
diff --git a/res/layout/photopage_bottom_controls.xml b/res/layout/photopage_bottom_controls.xml
index 8fe594d..f3226e6 100644
--- a/res/layout/photopage_bottom_controls.xml
+++ b/res/layout/photopage_bottom_controls.xml
@@ -10,7 +10,7 @@
android:visibility="gone">
<ImageButton
android:id="@+id/photopage_bottom_control_edit"
- android:src="@drawable/ic_photoeditor_effects"
+ android:src="@drawable/ic_menu_edit_holo_dark"
android:background="@drawable/photopage_bottom_button_background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 9e1d0be..d13d261 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -852,6 +852,7 @@
ImagePreset original = new ImagePreset(adapter.getItem(0));
mMasterImage.setPreset(original, true);
invalidateViews();
+ backToMain();
}
public void showDefaultImageView() {
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java
index e760ae5..02bbcde 100644
--- a/src/com/android/gallery3d/filtershow/editors/Editor.java
+++ b/src/com/android/gallery3d/filtershow/editors/Editor.java
@@ -59,6 +59,14 @@
public static byte SHOW_VALUE_OFF = 0;
public static byte SHOW_VALUE_INT = 1;
+ public static void hackFixStrings(Menu menu) {
+ int count = menu.size();
+ for (int i = 0; i < count; i++) {
+ MenuItem item = menu.getItem(i);
+ item.setTitle(item.getTitle().toString().toUpperCase());
+ }
+ }
+
public String calculateUserMessage(Context context, String effectName, Object parameterValue) {
return effectName.toUpperCase() + " " + parameterValue;
}
diff --git a/src/com/android/gallery3d/filtershow/editors/SwapButton.java b/src/com/android/gallery3d/filtershow/editors/SwapButton.java
index d8f3fc3..bb4432e 100644
--- a/src/com/android/gallery3d/filtershow/editors/SwapButton.java
+++ b/src/com/android/gallery3d/filtershow/editors/SwapButton.java
@@ -51,14 +51,6 @@
mListener = listener;
}
- public Menu getMenu() {
- return mMenu;
- }
-
- public void setMenu(Menu menu) {
- mMenu = menu;
- }
-
public boolean onTouchEvent(MotionEvent me) {
if (!mDetector.onTouchEvent(me)) {
return super.onTouchEvent(me);
diff --git a/src/com/android/gallery3d/filtershow/ui/ImageCurves.java b/src/com/android/gallery3d/filtershow/ui/ImageCurves.java
index 4755b90..f7dcad7 100644
--- a/src/com/android/gallery3d/filtershow/ui/ImageCurves.java
+++ b/src/com/android/gallery3d/filtershow/ui/ImageCurves.java
@@ -36,6 +36,7 @@
import android.widget.PopupMenu;
import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.editors.Editor;
import com.android.gallery3d.filtershow.editors.EditorCurves;
import com.android.gallery3d.filtershow.filters.FilterCurvesRepresentation;
import com.android.gallery3d.filtershow.filters.FiltersManager;
@@ -116,6 +117,7 @@
return true;
}
});
+ Editor.hackFixStrings(popupMenu.getMenu());
popupMenu.show();
}