OSDN Git Service

Fix b/4643148: Make PhotoEditor integrated into Gallery.
authorYuli Huang <yuli@google.com>
Mon, 12 Sep 2011 14:25:30 +0000 (22:25 +0800)
committerYuli Huang <yuli@google.com>
Mon, 12 Sep 2011 16:36:00 +0000 (00:36 +0800)
1. Move PhotoEditor code/resources into Gallery for single apk.
2. Change PhotoEditor package to com.android.gallery3d.photoeditor.
3. Rename PhotoEditor resources to avoid mess up Gallery resources.
4. Move Doodle effect from fix-effects to color-effects.
5. Update PhotoEditor bottom action-bar background.

Change-Id: I1a2f7d27d89a14fe6a0435575b993ed8b75e6bf4

64 files changed:
res/anim/photoeditor_fade_in.xml [new file with mode: 0644]
res/anim/photoeditor_fade_out.xml [new file with mode: 0644]
res/drawable/photoeditor_actionbar_translucent.9.png [new file with mode: 0644]
res/drawable/photoeditor_actionbar_translucent_bottom.9.png [new file with mode: 0644]
res/drawable/photoeditor_arrow_back.png [new file with mode: 0644]
res/drawable/photoeditor_artistic.png [new file with mode: 0644]
res/drawable/photoeditor_color.png [new file with mode: 0644]
res/drawable/photoeditor_effect_autofix.png [new file with mode: 0644]
res/drawable/photoeditor_effect_crop.png [new file with mode: 0644]
res/drawable/photoeditor_effect_crossprocess.png [new file with mode: 0644]
res/drawable/photoeditor_effect_documentary.png [new file with mode: 0644]
res/drawable/photoeditor_effect_doodle.png [new file with mode: 0644]
res/drawable/photoeditor_effect_duotone.png [new file with mode: 0644]
res/drawable/photoeditor_effect_filllight.png [new file with mode: 0644]
res/drawable/photoeditor_effect_fisheye.png [new file with mode: 0644]
res/drawable/photoeditor_effect_flip.png [new file with mode: 0644]
res/drawable/photoeditor_effect_grain.png [new file with mode: 0644]
res/drawable/photoeditor_effect_grayscale.png [new file with mode: 0644]
res/drawable/photoeditor_effect_highlight.png [new file with mode: 0644]
res/drawable/photoeditor_effect_lomoish.png [new file with mode: 0644]
res/drawable/photoeditor_effect_negative.png [new file with mode: 0644]
res/drawable/photoeditor_effect_posterize.png [new file with mode: 0644]
res/drawable/photoeditor_effect_redeye.png [new file with mode: 0644]
res/drawable/photoeditor_effect_rotate.png [new file with mode: 0644]
res/drawable/photoeditor_effect_saturation.png [new file with mode: 0644]
res/drawable/photoeditor_effect_sepia.png [new file with mode: 0644]
res/drawable/photoeditor_effect_shadow.png [new file with mode: 0644]
res/drawable/photoeditor_effect_sharpen.png [new file with mode: 0644]
res/drawable/photoeditor_effect_straighten.png [new file with mode: 0644]
res/drawable/photoeditor_effect_temperature.png [new file with mode: 0644]
res/drawable/photoeditor_effect_tint.png [new file with mode: 0644]
res/drawable/photoeditor_effect_vignette.png [new file with mode: 0644]
res/drawable/photoeditor_exposure.png [new file with mode: 0644]
res/drawable/photoeditor_fix.png [new file with mode: 0644]
res/drawable/photoeditor_redo.png [new file with mode: 0644]
res/drawable/photoeditor_scale_seekbar_color.9.png [new file with mode: 0644]
res/drawable/photoeditor_scale_seekbar_filllight.9.png [new file with mode: 0644]
res/drawable/photoeditor_scale_seekbar_generic.9.png [new file with mode: 0644]
res/drawable/photoeditor_scale_seekbar_highlight.9.png [new file with mode: 0644]
res/drawable/photoeditor_scale_seekbar_shadow.9.png [new file with mode: 0644]
res/drawable/photoeditor_seekbar_thumb.png [new file with mode: 0644]
res/drawable/photoeditor_toggle_button_background.xml [new file with mode: 0644]
res/drawable/photoeditor_toggle_button_highlight.9.png [new file with mode: 0644]
res/drawable/photoeditor_undo.png [new file with mode: 0644]
res/layout/photoeditor_color_seekbar.xml [new file with mode: 0644]
res/layout/photoeditor_crop_view.xml [new file with mode: 0644]
res/layout/photoeditor_doodle_view.xml [new file with mode: 0644]
res/layout/photoeditor_effect_tool_panel.xml [new file with mode: 0644]
res/layout/photoeditor_effects_artistic.xml [new file with mode: 0644]
res/layout/photoeditor_effects_color.xml [new file with mode: 0644]
res/layout/photoeditor_effects_exposure.xml [new file with mode: 0644]
res/layout/photoeditor_effects_fix.xml [new file with mode: 0644]
res/layout/photoeditor_effects_gallery.xml [new file with mode: 0644]
res/layout/photoeditor_main.xml [new file with mode: 0644]
res/layout/photoeditor_rotate_view.xml [new file with mode: 0644]
res/layout/photoeditor_scale_seekbar.xml [new file with mode: 0644]
res/layout/photoeditor_touch_view.xml [new file with mode: 0644]
res/values-sw320dp/photoeditor_dimens.xml [new file with mode: 0755]
res/values-sw600dp/photoeditor_dimens.xml [new file with mode: 0755]
res/values-sw800dp/photoeditor_dimens.xml [new file with mode: 0755]
res/values/photoeditor_arrays.xml [new file with mode: 0644]
res/values/photoeditor_colors.xml [new file with mode: 0644]
res/values/photoeditor_styles.xml [new file with mode: 0644]
src/com/android/gallery3d/photoeditor/SpinnerProgressDialog.java [new file with mode: 0644]

diff --git a/res/anim/photoeditor_fade_in.xml b/res/anim/photoeditor_fade_in.xml
new file mode 100644 (file)
index 0000000..7334041
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fromAlpha="0.25"
+    android:toAlpha="1.0"
+    android:duration="500"
+    android:fillAfter="true"/>
diff --git a/res/anim/photoeditor_fade_out.xml b/res/anim/photoeditor_fade_out.xml
new file mode 100644 (file)
index 0000000..ad97c49
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fromAlpha="1.0"
+    android:toAlpha="0.25"
+    android:duration="500"
+    android:fillAfter="true"/>
diff --git a/res/drawable/photoeditor_actionbar_translucent.9.png b/res/drawable/photoeditor_actionbar_translucent.9.png
new file mode 100644 (file)
index 0000000..76775a3
Binary files /dev/null and b/res/drawable/photoeditor_actionbar_translucent.9.png differ
diff --git a/res/drawable/photoeditor_actionbar_translucent_bottom.9.png b/res/drawable/photoeditor_actionbar_translucent_bottom.9.png
new file mode 100644 (file)
index 0000000..97018f8
Binary files /dev/null and b/res/drawable/photoeditor_actionbar_translucent_bottom.9.png differ
diff --git a/res/drawable/photoeditor_arrow_back.png b/res/drawable/photoeditor_arrow_back.png
new file mode 100644 (file)
index 0000000..897a1c1
Binary files /dev/null and b/res/drawable/photoeditor_arrow_back.png differ
diff --git a/res/drawable/photoeditor_artistic.png b/res/drawable/photoeditor_artistic.png
new file mode 100644 (file)
index 0000000..c887fe4
Binary files /dev/null and b/res/drawable/photoeditor_artistic.png differ
diff --git a/res/drawable/photoeditor_color.png b/res/drawable/photoeditor_color.png
new file mode 100644 (file)
index 0000000..566773d
Binary files /dev/null and b/res/drawable/photoeditor_color.png differ
diff --git a/res/drawable/photoeditor_effect_autofix.png b/res/drawable/photoeditor_effect_autofix.png
new file mode 100644 (file)
index 0000000..f0e2d46
Binary files /dev/null and b/res/drawable/photoeditor_effect_autofix.png differ
diff --git a/res/drawable/photoeditor_effect_crop.png b/res/drawable/photoeditor_effect_crop.png
new file mode 100644 (file)
index 0000000..eb7da1b
Binary files /dev/null and b/res/drawable/photoeditor_effect_crop.png differ
diff --git a/res/drawable/photoeditor_effect_crossprocess.png b/res/drawable/photoeditor_effect_crossprocess.png
new file mode 100644 (file)
index 0000000..f9e596a
Binary files /dev/null and b/res/drawable/photoeditor_effect_crossprocess.png differ
diff --git a/res/drawable/photoeditor_effect_documentary.png b/res/drawable/photoeditor_effect_documentary.png
new file mode 100644 (file)
index 0000000..92c40f9
Binary files /dev/null and b/res/drawable/photoeditor_effect_documentary.png differ
diff --git a/res/drawable/photoeditor_effect_doodle.png b/res/drawable/photoeditor_effect_doodle.png
new file mode 100644 (file)
index 0000000..5b63178
Binary files /dev/null and b/res/drawable/photoeditor_effect_doodle.png differ
diff --git a/res/drawable/photoeditor_effect_duotone.png b/res/drawable/photoeditor_effect_duotone.png
new file mode 100644 (file)
index 0000000..994e104
Binary files /dev/null and b/res/drawable/photoeditor_effect_duotone.png differ
diff --git a/res/drawable/photoeditor_effect_filllight.png b/res/drawable/photoeditor_effect_filllight.png
new file mode 100644 (file)
index 0000000..999b7f7
Binary files /dev/null and b/res/drawable/photoeditor_effect_filllight.png differ
diff --git a/res/drawable/photoeditor_effect_fisheye.png b/res/drawable/photoeditor_effect_fisheye.png
new file mode 100644 (file)
index 0000000..5fd1b93
Binary files /dev/null and b/res/drawable/photoeditor_effect_fisheye.png differ
diff --git a/res/drawable/photoeditor_effect_flip.png b/res/drawable/photoeditor_effect_flip.png
new file mode 100644 (file)
index 0000000..dd74813
Binary files /dev/null and b/res/drawable/photoeditor_effect_flip.png differ
diff --git a/res/drawable/photoeditor_effect_grain.png b/res/drawable/photoeditor_effect_grain.png
new file mode 100644 (file)
index 0000000..f6ff7fa
Binary files /dev/null and b/res/drawable/photoeditor_effect_grain.png differ
diff --git a/res/drawable/photoeditor_effect_grayscale.png b/res/drawable/photoeditor_effect_grayscale.png
new file mode 100644 (file)
index 0000000..3c09cd3
Binary files /dev/null and b/res/drawable/photoeditor_effect_grayscale.png differ
diff --git a/res/drawable/photoeditor_effect_highlight.png b/res/drawable/photoeditor_effect_highlight.png
new file mode 100644 (file)
index 0000000..1d59fb4
Binary files /dev/null and b/res/drawable/photoeditor_effect_highlight.png differ
diff --git a/res/drawable/photoeditor_effect_lomoish.png b/res/drawable/photoeditor_effect_lomoish.png
new file mode 100644 (file)
index 0000000..ee347e6
Binary files /dev/null and b/res/drawable/photoeditor_effect_lomoish.png differ
diff --git a/res/drawable/photoeditor_effect_negative.png b/res/drawable/photoeditor_effect_negative.png
new file mode 100644 (file)
index 0000000..96da62c
Binary files /dev/null and b/res/drawable/photoeditor_effect_negative.png differ
diff --git a/res/drawable/photoeditor_effect_posterize.png b/res/drawable/photoeditor_effect_posterize.png
new file mode 100644 (file)
index 0000000..ac5384b
Binary files /dev/null and b/res/drawable/photoeditor_effect_posterize.png differ
diff --git a/res/drawable/photoeditor_effect_redeye.png b/res/drawable/photoeditor_effect_redeye.png
new file mode 100644 (file)
index 0000000..ba845b5
Binary files /dev/null and b/res/drawable/photoeditor_effect_redeye.png differ
diff --git a/res/drawable/photoeditor_effect_rotate.png b/res/drawable/photoeditor_effect_rotate.png
new file mode 100644 (file)
index 0000000..fa50ce2
Binary files /dev/null and b/res/drawable/photoeditor_effect_rotate.png differ
diff --git a/res/drawable/photoeditor_effect_saturation.png b/res/drawable/photoeditor_effect_saturation.png
new file mode 100644 (file)
index 0000000..d151d5c
Binary files /dev/null and b/res/drawable/photoeditor_effect_saturation.png differ
diff --git a/res/drawable/photoeditor_effect_sepia.png b/res/drawable/photoeditor_effect_sepia.png
new file mode 100644 (file)
index 0000000..236b990
Binary files /dev/null and b/res/drawable/photoeditor_effect_sepia.png differ
diff --git a/res/drawable/photoeditor_effect_shadow.png b/res/drawable/photoeditor_effect_shadow.png
new file mode 100644 (file)
index 0000000..e3caa44
Binary files /dev/null and b/res/drawable/photoeditor_effect_shadow.png differ
diff --git a/res/drawable/photoeditor_effect_sharpen.png b/res/drawable/photoeditor_effect_sharpen.png
new file mode 100644 (file)
index 0000000..2bd0fff
Binary files /dev/null and b/res/drawable/photoeditor_effect_sharpen.png differ
diff --git a/res/drawable/photoeditor_effect_straighten.png b/res/drawable/photoeditor_effect_straighten.png
new file mode 100644 (file)
index 0000000..309eb5a
Binary files /dev/null and b/res/drawable/photoeditor_effect_straighten.png differ
diff --git a/res/drawable/photoeditor_effect_temperature.png b/res/drawable/photoeditor_effect_temperature.png
new file mode 100644 (file)
index 0000000..d4f1355
Binary files /dev/null and b/res/drawable/photoeditor_effect_temperature.png differ
diff --git a/res/drawable/photoeditor_effect_tint.png b/res/drawable/photoeditor_effect_tint.png
new file mode 100644 (file)
index 0000000..6a6bb33
Binary files /dev/null and b/res/drawable/photoeditor_effect_tint.png differ
diff --git a/res/drawable/photoeditor_effect_vignette.png b/res/drawable/photoeditor_effect_vignette.png
new file mode 100644 (file)
index 0000000..e529563
Binary files /dev/null and b/res/drawable/photoeditor_effect_vignette.png differ
diff --git a/res/drawable/photoeditor_exposure.png b/res/drawable/photoeditor_exposure.png
new file mode 100644 (file)
index 0000000..b6e3566
Binary files /dev/null and b/res/drawable/photoeditor_exposure.png differ
diff --git a/res/drawable/photoeditor_fix.png b/res/drawable/photoeditor_fix.png
new file mode 100644 (file)
index 0000000..4b8f3b8
Binary files /dev/null and b/res/drawable/photoeditor_fix.png differ
diff --git a/res/drawable/photoeditor_redo.png b/res/drawable/photoeditor_redo.png
new file mode 100644 (file)
index 0000000..9daa01c
Binary files /dev/null and b/res/drawable/photoeditor_redo.png differ
diff --git a/res/drawable/photoeditor_scale_seekbar_color.9.png b/res/drawable/photoeditor_scale_seekbar_color.9.png
new file mode 100644 (file)
index 0000000..d78ff9b
Binary files /dev/null and b/res/drawable/photoeditor_scale_seekbar_color.9.png differ
diff --git a/res/drawable/photoeditor_scale_seekbar_filllight.9.png b/res/drawable/photoeditor_scale_seekbar_filllight.9.png
new file mode 100644 (file)
index 0000000..43acaf3
Binary files /dev/null and b/res/drawable/photoeditor_scale_seekbar_filllight.9.png differ
diff --git a/res/drawable/photoeditor_scale_seekbar_generic.9.png b/res/drawable/photoeditor_scale_seekbar_generic.9.png
new file mode 100644 (file)
index 0000000..3ee3cc7
Binary files /dev/null and b/res/drawable/photoeditor_scale_seekbar_generic.9.png differ
diff --git a/res/drawable/photoeditor_scale_seekbar_highlight.9.png b/res/drawable/photoeditor_scale_seekbar_highlight.9.png
new file mode 100644 (file)
index 0000000..70f54b8
Binary files /dev/null and b/res/drawable/photoeditor_scale_seekbar_highlight.9.png differ
diff --git a/res/drawable/photoeditor_scale_seekbar_shadow.9.png b/res/drawable/photoeditor_scale_seekbar_shadow.9.png
new file mode 100644 (file)
index 0000000..b17a785
Binary files /dev/null and b/res/drawable/photoeditor_scale_seekbar_shadow.9.png differ
diff --git a/res/drawable/photoeditor_seekbar_thumb.png b/res/drawable/photoeditor_seekbar_thumb.png
new file mode 100644 (file)
index 0000000..0d452c1
Binary files /dev/null and b/res/drawable/photoeditor_seekbar_thumb.png differ
diff --git a/res/drawable/photoeditor_toggle_button_background.xml b/res/drawable/photoeditor_toggle_button_background.xml
new file mode 100644 (file)
index 0000000..81c39ca
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+
+    <item android:state_selected="true" android:drawable="@drawable/photoeditor_toggle_button_highlight" />
+    <item android:state_pressed="true" android:drawable="@drawable/photoeditor_toggle_button_highlight" />
+    <item android:drawable="@android:color/transparent" />
+
+</selector>
diff --git a/res/drawable/photoeditor_toggle_button_highlight.9.png b/res/drawable/photoeditor_toggle_button_highlight.9.png
new file mode 100644 (file)
index 0000000..add582a
Binary files /dev/null and b/res/drawable/photoeditor_toggle_button_highlight.9.png differ
diff --git a/res/drawable/photoeditor_undo.png b/res/drawable/photoeditor_undo.png
new file mode 100644 (file)
index 0000000..0a7e0d1
Binary files /dev/null and b/res/drawable/photoeditor_undo.png differ
diff --git a/res/layout/photoeditor_color_seekbar.xml b/res/layout/photoeditor_color_seekbar.xml
new file mode 100644 (file)
index 0000000..fb93869
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.actions.ColorSeekBar
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="@dimen/seekbar_width"
+    android:layout_height="@dimen/seekbar_height"
+    android:layout_marginBottom="@dimen/seekbar_margin_bottom"
+    android:minHeight="@dimen/seekbar_height"
+    android:maxHeight="@dimen/seekbar_height"
+    android:progressDrawable="@android:color/transparent"/>
diff --git a/res/layout/photoeditor_crop_view.xml b/res/layout/photoeditor_crop_view.xml
new file mode 100644 (file)
index 0000000..151e6a6
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.actions.CropView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/fullscreen_effect_tool"
+    style="@style/FullscreenToolView"/>
diff --git a/res/layout/photoeditor_doodle_view.xml b/res/layout/photoeditor_doodle_view.xml
new file mode 100644 (file)
index 0000000..d8e0868
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.actions.DoodleView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/fullscreen_effect_tool"
+    style="@style/FullscreenToolView"/>
diff --git a/res/layout/photoeditor_effect_tool_panel.xml b/res/layout/photoeditor_effect_tool_panel.xml
new file mode 100644 (file)
index 0000000..7fd9257
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:padding="@dimen/effect_tool_panel_padding"
+    android:background="@color/translucent_black"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/effect_label"
+        style="@style/EffectLabel"/>
+</LinearLayout>
diff --git a/res/layout/photoeditor_effects_artistic.xml b/res/layout/photoeditor_effects_artistic.xml
new file mode 100644 (file)
index 0000000..f5eb63a
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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"
+    style="@style/EffectsContainer">
+
+    <com.android.gallery3d.photoeditor.actions.CrossProcessAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_crossprocess"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/crossprocess"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.CrossProcessAction>
+    <com.android.gallery3d.photoeditor.actions.PosterizeAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_posterize"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/posterize"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.PosterizeAction>
+    <com.android.gallery3d.photoeditor.actions.LomoishAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_lomoish"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/lomoish"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.LomoishAction>
+    <com.android.gallery3d.photoeditor.actions.DocumentaryAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_documentary"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/documentary"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.DocumentaryAction>
+    <com.android.gallery3d.photoeditor.actions.VignetteAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_vignette"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/vignette"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.VignetteAction>
+    <com.android.gallery3d.photoeditor.actions.GrainAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_grain"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/grain"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.GrainAction>
+    <com.android.gallery3d.photoeditor.actions.FisheyeAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_fisheye"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/fisheye"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.FisheyeAction>
+
+</LinearLayout>
diff --git a/res/layout/photoeditor_effects_color.xml b/res/layout/photoeditor_effects_color.xml
new file mode 100644 (file)
index 0000000..c078dfa
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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"
+    style="@style/EffectsContainer">
+
+    <com.android.gallery3d.photoeditor.actions.ColorTemperatureAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_temperature"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/temperature"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.ColorTemperatureAction>
+    <com.android.gallery3d.photoeditor.actions.SaturationAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_saturation"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/saturation"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.SaturationAction>
+    <com.android.gallery3d.photoeditor.actions.GrayscaleAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_grayscale"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/grayscale"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.GrayscaleAction>
+    <com.android.gallery3d.photoeditor.actions.SepiaAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_sepia"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/sepia"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.SepiaAction>
+    <com.android.gallery3d.photoeditor.actions.NegativeAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_negative"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/negative"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.NegativeAction>
+    <com.android.gallery3d.photoeditor.actions.TintAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_tint"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/tint"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.TintAction>
+    <com.android.gallery3d.photoeditor.actions.DuotoneAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_duotone"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/duotone"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.DuotoneAction>
+    <com.android.gallery3d.photoeditor.actions.DoodleAction style="@style/Effect"
+        android:tag="@string/doodle_tooltip">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_doodle"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/doodle"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.DoodleAction>
+
+</LinearLayout>
diff --git a/res/layout/photoeditor_effects_exposure.xml b/res/layout/photoeditor_effects_exposure.xml
new file mode 100644 (file)
index 0000000..5a4fb29
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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"
+    style="@style/EffectsContainer">
+
+    <com.android.gallery3d.photoeditor.actions.FillLightAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_filllight"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/filllight"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.FillLightAction>
+    <com.android.gallery3d.photoeditor.actions.HighlightAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_highlight"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/highlight"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.HighlightAction>
+    <com.android.gallery3d.photoeditor.actions.ShadowAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_shadow"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/shadow"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.ShadowAction>
+    <com.android.gallery3d.photoeditor.actions.AutoFixAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_autofix"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/autofix"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.AutoFixAction>
+
+</LinearLayout>
diff --git a/res/layout/photoeditor_effects_fix.xml b/res/layout/photoeditor_effects_fix.xml
new file mode 100644 (file)
index 0000000..b77ffd1
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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"
+    style="@style/EffectsContainer">
+
+    <com.android.gallery3d.photoeditor.actions.CropAction style="@style/Effect"
+        android:tag="@string/crop_tooltip">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_crop"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/crop"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.CropAction>
+    <com.android.gallery3d.photoeditor.actions.RedEyeAction style="@style/Effect"
+        android:tag="@string/redeye_tooltip">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_redeye"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/redeye"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.RedEyeAction>
+    <com.android.gallery3d.photoeditor.actions.StraightenAction style="@style/Effect"
+        android:tag="@string/straighten_tooltip">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_straighten"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/straighten"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.StraightenAction>
+    <com.android.gallery3d.photoeditor.actions.RotateAction style="@style/Effect"
+        android:tag="@string/rotate_tooltip">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_rotate"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/rotate"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.RotateAction>
+    <com.android.gallery3d.photoeditor.actions.FlipAction style="@style/Effect"
+        android:tag="@string/flip_tooltip">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_flip"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/flip"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.FlipAction>
+    <com.android.gallery3d.photoeditor.actions.SharpenAction style="@style/Effect">
+        <ImageButton
+            android:id="@+id/effect_button"
+            style="@style/EffectIcon"
+            android:src="@drawable/photoeditor_effect_sharpen"/>
+        <TextView
+            android:id="@+id/effect_label"
+            android:text="@string/sharpen"
+            style="@style/EffectLabel"/>
+    </com.android.gallery3d.photoeditor.actions.SharpenAction>
+
+</LinearLayout>
diff --git a/res/layout/photoeditor_effects_gallery.xml b/res/layout/photoeditor_effects_gallery.xml
new file mode 100644 (file)
index 0000000..16a2366
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!-- The linear-layout is used to center content that cannot fill scroll-view -->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/translucent_black"
+    android:gravity="center_horizontal">
+
+    <HorizontalScrollView
+        android:id="@+id/scroll_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:scrollbars="none"/>
+</LinearLayout>
diff --git a/res/layout/photoeditor_main.xml b/res/layout/photoeditor_main.xml
new file mode 100644 (file)
index 0000000..dd7551f
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.Toolbar
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/toolbar"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+
+    <com.android.gallery3d.photoeditor.PhotoView
+        android:id="@+id/photo_view"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"/>
+
+    <com.android.gallery3d.photoeditor.EffectsBar android:id="@+id/effects_bar" style="@style/EffectsBar">
+
+        <LinearLayout style="@style/BottomActionBar" android:gravity="center_horizontal">
+
+            <LinearLayout android:id="@+id/effects_menu" style="@style/ActionBarLinearLayout">
+
+                <ImageButton
+                    android:id="@+id/exposure_button"
+                    style="@style/EffectsMenuActionButton"
+                    android:src="@drawable/photoeditor_exposure"/>
+                <ImageButton
+                    android:id="@+id/artistic_button"
+                    style="@style/EffectsMenuActionButton"
+                    android:src="@drawable/photoeditor_artistic"/>
+                <ImageButton
+                    android:id="@+id/color_button"
+                    style="@style/EffectsMenuActionButton"
+                    android:src="@drawable/photoeditor_color"/>
+                <ImageButton
+                    android:id="@+id/fix_button"
+                    style="@style/EffectsMenuActionButton"
+                    android:src="@drawable/photoeditor_fix"/>
+            </LinearLayout>
+
+        </LinearLayout>
+    </com.android.gallery3d.photoeditor.EffectsBar>
+
+    <com.android.gallery3d.photoeditor.ActionBar android:id="@+id/action_bar" style="@style/TopActionBar">
+
+        <LinearLayout style="@style/ActionBarLinearLayout">
+
+            <LinearLayout
+                android:id="@+id/action_bar_back"
+                style="@style/ActionBarBackLinearLayout">
+                <ImageView style="@style/ActionBarArrow"/>
+                <ImageView style="@style/ActionBarIcon"/>
+            </LinearLayout>
+
+            <TextView android:id="@+id/action_bar_title" style="@style/ActionBarText"/>
+        </LinearLayout>
+
+        <LinearLayout style="@style/ActionBarLinearLayout" android:layout_alignParentRight="true">
+
+            <ImageButton
+                android:id="@+id/undo_button"
+                style="@style/ImageActionButton"
+                android:src="@drawable/photoeditor_undo"/>
+            <ImageButton
+                android:id="@+id/redo_button"
+                style="@style/ImageActionButton"
+                android:src="@drawable/photoeditor_redo"/>
+            <Button
+                android:id="@+id/save_button"
+                style="@style/TextActionButton"
+                android:text="@string/save"/>
+        </LinearLayout>
+    </com.android.gallery3d.photoeditor.ActionBar>
+</com.android.gallery3d.photoeditor.Toolbar>
diff --git a/res/layout/photoeditor_rotate_view.xml b/res/layout/photoeditor_rotate_view.xml
new file mode 100644 (file)
index 0000000..9dbe9d0
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.actions.RotateView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/fullscreen_effect_tool"
+    style="@style/FullscreenToolView"/>
diff --git a/res/layout/photoeditor_scale_seekbar.xml b/res/layout/photoeditor_scale_seekbar.xml
new file mode 100644 (file)
index 0000000..d8df19f
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.actions.ScaleSeekBar
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="@dimen/seekbar_width"
+    android:layout_height="@dimen/seekbar_height"
+    android:layout_marginBottom="@dimen/seekbar_margin_bottom"
+    android:minHeight="@dimen/seekbar_height"
+    android:maxHeight="@dimen/seekbar_height"
+    android:progressDrawable="@android:color/transparent"/>
diff --git a/res/layout/photoeditor_touch_view.xml b/res/layout/photoeditor_touch_view.xml
new file mode 100644 (file)
index 0000000..39a0871
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<com.android.gallery3d.photoeditor.actions.TouchView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/fullscreen_effect_tool"
+    style="@style/FullscreenToolView"/>
diff --git a/res/values-sw320dp/photoeditor_dimens.xml b/res/values-sw320dp/photoeditor_dimens.xml
new file mode 100755 (executable)
index 0000000..cde3fe9
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <dimen name="effect_label_text_size">11sp</dimen>
+    <dimen name="effect_label_width">98sp</dimen>
+    <dimen name="effect_icon_size">72dp</dimen>
+    <dimen name="effect_padding_left_right">2dp</dimen>
+    <dimen name="effects_container_padding">12dp</dimen>
+    <dimen name="action_bar_height">40dp</dimen>
+    <dimen name="action_bar_text_size">17sp</dimen>
+    <dimen name="action_bar_arrow_padding_top">12dp</dimen>
+    <dimen name="action_bar_arrow_padding_bottom">12dp</dimen>
+    <dimen name="action_bar_arrow_padding_left">3dp</dimen>
+    <dimen name="action_bar_arrow_padding_right">0dp</dimen>
+    <dimen name="action_bar_icon_padding_top">4dp</dimen>
+    <dimen name="action_bar_icon_padding_bottom">4dp</dimen>
+    <dimen name="action_bar_icon_padding_left">0dp</dimen>
+    <dimen name="action_bar_icon_padding_right">6dp</dimen>
+    <dimen name="action_button_padding_top">5dp</dimen>
+    <dimen name="action_button_padding_bottom">5dp</dimen>
+    <dimen name="action_button_padding_left">15dp</dimen>
+    <dimen name="action_button_padding_right">15dp</dimen>
+    <dimen name="effect_tool_panel_padding">12dp</dimen>
+    <dimen name="seekbar_width">290dp</dimen>
+    <dimen name="seekbar_height">29dp</dimen>
+    <dimen name="seekbar_margin_bottom">6dp</dimen>
+    <dimen name="crop_indicator_size">35dp</dimen>
+</resources>
diff --git a/res/values-sw600dp/photoeditor_dimens.xml b/res/values-sw600dp/photoeditor_dimens.xml
new file mode 100755 (executable)
index 0000000..285420a
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <dimen name="effect_label_text_size">14sp</dimen>
+    <dimen name="effect_label_width">120sp</dimen>
+    <dimen name="effect_icon_size">90dp</dimen>
+    <dimen name="effect_padding_left_right">2dp</dimen>
+    <dimen name="effects_container_padding">12dp</dimen>
+    <dimen name="action_bar_height">56dp</dimen>
+    <dimen name="action_bar_text_size">18sp</dimen>
+    <dimen name="action_bar_arrow_padding_top">20dp</dimen>
+    <dimen name="action_bar_arrow_padding_bottom">20dp</dimen>
+    <dimen name="action_bar_arrow_padding_left">4dp</dimen>
+    <dimen name="action_bar_arrow_padding_right">0dp</dimen>
+    <dimen name="action_bar_icon_padding_top">7dp</dimen>
+    <dimen name="action_bar_icon_padding_bottom">7dp</dimen>
+    <dimen name="action_bar_icon_padding_left">0dp</dimen>
+    <dimen name="action_bar_icon_padding_right">8dp</dimen>
+    <dimen name="action_button_padding_top">9dp</dimen>
+    <dimen name="action_button_padding_bottom">9dp</dimen>
+    <dimen name="action_button_padding_left">22dp</dimen>
+    <dimen name="action_button_padding_right">22dp</dimen>
+    <dimen name="effect_tool_panel_padding">16dp</dimen>
+    <dimen name="seekbar_width">560dp</dimen>
+    <dimen name="seekbar_height">33dp</dimen>
+    <dimen name="seekbar_margin_bottom">8dp</dimen>
+    <dimen name="crop_indicator_size">43dp</dimen>
+</resources>
diff --git a/res/values-sw800dp/photoeditor_dimens.xml b/res/values-sw800dp/photoeditor_dimens.xml
new file mode 100755 (executable)
index 0000000..8cce1ba
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <dimen name="effect_label_text_size">15sp</dimen>
+    <dimen name="effect_label_width">138sp</dimen>
+    <dimen name="effect_icon_size">100dp</dimen>
+    <dimen name="effect_padding_left_right">3dp</dimen>
+    <dimen name="effects_container_padding">18dp</dimen>
+    <dimen name="action_bar_height">56dp</dimen>
+    <dimen name="action_bar_text_size">19sp</dimen>
+    <dimen name="action_bar_arrow_padding_top">20dp</dimen>
+    <dimen name="action_bar_arrow_padding_bottom">20dp</dimen>
+    <dimen name="action_bar_arrow_padding_left">4dp</dimen>
+    <dimen name="action_bar_arrow_padding_right">0dp</dimen>
+    <dimen name="action_bar_icon_padding_top">7dp</dimen>
+    <dimen name="action_bar_icon_padding_bottom">7dp</dimen>
+    <dimen name="action_bar_icon_padding_left">0dp</dimen>
+    <dimen name="action_bar_icon_padding_right">11dp</dimen>
+    <dimen name="action_button_padding_top">9dp</dimen>
+    <dimen name="action_button_padding_bottom">9dp</dimen>
+    <dimen name="action_button_padding_left">28dp</dimen>
+    <dimen name="action_button_padding_right">28dp</dimen>
+    <dimen name="effect_tool_panel_padding">18dp</dimen>
+    <dimen name="seekbar_width">560dp</dimen>
+    <dimen name="seekbar_height">35dp</dimen>
+    <dimen name="seekbar_margin_bottom">9dp</dimen>
+    <dimen name="crop_indicator_size">48dp</dimen>
+</resources>
diff --git a/res/values/photoeditor_arrays.xml b/res/values/photoeditor_arrays.xml
new file mode 100644 (file)
index 0000000..4c27215
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<resources>
+    <array name="color_picker_colors">
+        <item>@color/color_picker_preset_color1</item>
+        <item>@color/color_picker_preset_color2</item>
+        <item>@color/color_picker_preset_color3</item>
+        <item>@color/color_picker_preset_color4</item>
+        <item>@color/color_picker_preset_color5</item>
+        <item>@color/color_picker_preset_color6</item>
+        <item>@color/color_picker_preset_color7</item>
+        <item>@color/color_picker_preset_color8</item>
+        <item>@color/color_picker_preset_color9</item>
+        <item>@color/color_picker_preset_color10</item>
+        <item>@color/color_picker_preset_color11</item>
+        <item>@color/color_picker_preset_color12</item>
+        <item>@color/color_picker_preset_color13</item>
+        <item>@color/color_picker_preset_color14</item>
+        <item>@color/color_picker_preset_color15</item>
+        <item>@color/color_picker_preset_color16</item>
+        <item>@color/color_picker_preset_color17</item>
+        <item>@color/color_picker_preset_color18</item>
+        <item>@color/color_picker_preset_color19</item>
+        <item>@color/color_picker_preset_color20</item>
+        <item>@color/color_picker_preset_color21</item>
+        <item>@color/color_picker_preset_color22</item>
+        <item>@color/color_picker_preset_color23</item>
+        <item>@color/color_picker_preset_color24</item>
+    </array>
+</resources>
diff --git a/res/values/photoeditor_colors.xml b/res/values/photoeditor_colors.xml
new file mode 100644 (file)
index 0000000..9899924
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<resources>
+    <color name="translucent_black">#67000000</color>
+    <color name="color_picker_preset_color1">#ddff1e00</color>
+    <color name="color_picker_preset_color2">#ddff5b00</color>
+    <color name="color_picker_preset_color3">#ddff9900</color>
+    <color name="color_picker_preset_color4">#ddffd600</color>
+    <color name="color_picker_preset_color5">#ddeaff00</color>
+    <color name="color_picker_preset_color6">#ddadff00</color>
+    <color name="color_picker_preset_color7">#dd70ff00</color>
+    <color name="color_picker_preset_color8">#dd32ff00</color>
+    <color name="color_picker_preset_color9">#dd00ff0a</color>
+    <color name="color_picker_preset_color10">#dd00ff47</color>
+    <color name="color_picker_preset_color11">#dd00ff84</color>
+    <color name="color_picker_preset_color12">#dd00ffc1</color>
+    <color name="color_picker_preset_color13">#dd00ffff</color>
+    <color name="color_picker_preset_color14">#dd00c1ff</color>
+    <color name="color_picker_preset_color15">#dd0084ff</color>
+    <color name="color_picker_preset_color16">#dd0047ff</color>
+    <color name="color_picker_preset_color17">#dd000aff</color>
+    <color name="color_picker_preset_color18">#dd3300ff</color>
+    <color name="color_picker_preset_color19">#dd7000ff</color>
+    <color name="color_picker_preset_color20">#ddad00ff</color>
+    <color name="color_picker_preset_color21">#ddea00ff</color>
+    <color name="color_picker_preset_color22">#ddff00d6</color>
+    <color name="color_picker_preset_color23">#ddff0098</color>
+    <color name="color_picker_preset_color24">#ddff005b</color>
+</resources>
diff --git a/res/values/photoeditor_styles.xml b/res/values/photoeditor_styles.xml
new file mode 100644 (file)
index 0000000..42b91d1
--- /dev/null
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="EffectIcon">
+        <item name="android:layout_width">@dimen/effect_icon_size</item>
+        <item name="android:layout_height">@dimen/effect_icon_size</item>
+        <item name="android:layout_gravity">center_horizontal</item>
+        <item name="android:scaleType">fitCenter</item>
+        <item name="android:background">@null</item>
+    </style>
+    <style name="EffectLabel">
+        <item name="android:layout_width">@dimen/effect_label_width</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_gravity">center_horizontal</item>
+        <item name="android:gravity">center</item>
+        <item name="android:textSize">@dimen/effect_label_text_size</item>
+        <item name="android:textColor">#FFFFFF</item>
+        <item name="android:maxLines">1</item>
+        <item name="android:shadowColor">#000000</item>
+        <item name="android:shadowRadius">2.0</item>
+    </style>
+    <style name="Effect">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_gravity">center_vertical</item>
+        <item name="android:paddingLeft">@dimen/effect_padding_left_right</item>
+        <item name="android:paddingRight">@dimen/effect_padding_left_right</item>
+        <item name="android:orientation">vertical</item>
+    </style>
+    <style name="EffectsContainer">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:padding">@dimen/effects_container_padding</item>
+        <item name="android:orientation">horizontal</item>
+    </style>
+    <style name="EffectsBar">
+        <item name="android:layout_width">fill_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_alignParentBottom">true</item>
+        <item name="android:orientation">vertical</item>
+    </style>
+    <style name="TopActionBar" parent="@style/ActionBar">
+        <item name="android:layout_alignParentTop">true</item>
+        <item name="android:background">@drawable/photoeditor_actionbar_translucent</item>
+    </style>
+    <style name="BottomActionBar" parent="@style/ActionBar">
+        <item name="android:background">@drawable/photoeditor_actionbar_translucent_bottom</item>
+    </style>
+    <style name="ActionBar">
+        <item name="android:layout_width">fill_parent</item>
+        <item name="android:layout_height">@dimen/action_bar_height</item>
+    </style>
+    <style name="ActionBarLinearLayout">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">fill_parent</item>
+        <item name="android:layout_centerVertical">true</item>
+        <item name="android:orientation">horizontal</item>
+    </style>
+    <style name="ActionBarBackLinearLayout" parent="@style/ActionBarLinearLayout">
+        <item name="android:clickable">true</item>
+        <item name="android:focusable">true</item>
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+    </style>
+    <style name="ActionBarImageView">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">fill_parent</item>
+        <item name="android:layout_gravity">center</item>
+        <item name="android:scaleType">centerInside</item>
+        <item name="android:adjustViewBounds">true</item>
+    </style>
+    <style name="ActionBarArrow" parent="@style/ActionBarImageView">
+        <item name="android:paddingTop">@dimen/action_bar_arrow_padding_top</item>
+        <item name="android:paddingBottom">@dimen/action_bar_arrow_padding_bottom</item>
+        <item name="android:paddingLeft">@dimen/action_bar_arrow_padding_left</item>
+        <item name="android:paddingRight">@dimen/action_bar_arrow_padding_right</item>
+        <item name="android:src">@drawable/photoeditor_arrow_back</item>
+    </style>
+    <style name="ActionBarIcon" parent="@style/ActionBarImageView">
+        <item name="android:paddingTop">@dimen/action_bar_icon_padding_top</item>
+        <item name="android:paddingBottom">@dimen/action_bar_icon_padding_bottom</item>
+        <item name="android:paddingLeft">@dimen/action_bar_icon_padding_left</item>
+        <item name="android:paddingRight">@dimen/action_bar_icon_padding_right</item>
+        <item name="android:src">@mipmap/ic_launcher_gallery</item>
+    </style>
+    <style name="ActionBarText">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_gravity">center</item>
+        <item name="android:textSize">@dimen/action_bar_text_size</item>
+        <item name="android:textColor">#FFFFFF</item>
+    </style>
+    <style name="ImageActionButton" parent="@style/ActionBarImageView">
+        <item name="android:paddingTop">@dimen/action_button_padding_top</item>
+        <item name="android:paddingBottom">@dimen/action_button_padding_bottom</item>
+        <item name="android:paddingLeft">@dimen/action_button_padding_left</item>
+        <item name="android:paddingRight">@dimen/action_button_padding_right</item>
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+    </style>
+    <style name="TextActionButton" parent="@style/ActionBarText">
+        <item name="android:paddingLeft">@dimen/action_button_padding_left</item>
+        <item name="android:paddingRight">@dimen/action_button_padding_right</item>
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+    </style>
+    <style name="EffectsMenuActionButton" parent="@style/ImageActionButton">
+        <item name="android:background">@drawable/photoeditor_toggle_button_background</item>
+    </style>
+    <style name="FullscreenToolView">
+        <item name="android:layout_width">fill_parent</item>
+        <item name="android:layout_height">fill_parent</item>
+    </style>
+    <style name="SpinnerProgressDialog">
+        <item name="android:background">@android:color/transparent</item>
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowTitleStyle">@null</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:backgroundDimEnabled">false</item>
+    </style>
+</resources>
diff --git a/src/com/android/gallery3d/photoeditor/SpinnerProgressDialog.java b/src/com/android/gallery3d/photoeditor/SpinnerProgressDialog.java
new file mode 100644 (file)
index 0000000..9a3d849
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 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.photoeditor;
+
+import android.app.Dialog;
+import android.view.MotionEvent;
+import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
+import android.widget.ProgressBar;
+
+import com.android.gallery3d.R;
+
+/**
+ * Spinner model progress dialog that disables all tools for user interaction after it shows up and
+ * and re-enables them after it dismisses.
+ */
+public class SpinnerProgressDialog extends Dialog {
+
+    private final ViewGroup tools;
+
+    public static SpinnerProgressDialog show(ViewGroup tools) {
+        SpinnerProgressDialog dialog = new SpinnerProgressDialog(tools);
+        dialog.setCancelable(false);
+        dialog.show();
+        return dialog;
+    }
+
+    private SpinnerProgressDialog(ViewGroup tools) {
+        super(tools.getContext(), R.style.SpinnerProgressDialog);
+
+        addContentView(new ProgressBar(tools.getContext()), new LayoutParams(
+                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+
+        this.tools = tools;
+        enableTools(false);
+    }
+
+    @Override
+    public void dismiss() {
+        super.dismiss();
+
+        enableTools(true);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        super.onTouchEvent(event);
+
+        // Pass touch events to tools for killing idle even when the progress dialog is shown.
+        return tools.dispatchTouchEvent(event);
+    }
+
+    private void enableTools(boolean enabled) {
+        for (int i = 0; i < tools.getChildCount(); i++) {
+            tools.getChildAt(i).setEnabled(enabled);
+        }
+    }
+}