summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml2
-rw-r--r--res/drawable/comparison.xml35
-rw-r--r--res/drawable/ic_video_snapshot.xml2
-rw-r--r--res/drawable/ic_video_snapshot_padding_pressed.xml38
-rw-r--r--res/drawable/ic_video_snapshot_pressed.xml43
-rw-r--r--res/drawable/ic_video_snapshot_selector.xml36
-rw-r--r--res/drawable/truescanner_background.xml34
-rw-r--r--res/drawable/truescanner_select.xml63
-rw-r--r--res/layout/filtershow_actionbar.xml8
-rw-r--r--res/layout/filtershow_actionbar_effects.xml4
-rw-r--r--res/layout/filtershow_activity.xml2
-rw-r--r--res/layout/filtershow_bottom_panel.xml21
-rw-r--r--res/layout/filtershow_category_geometry_panel.xml7
-rw-r--r--res/layout/filtershow_export_dialog.xml51
-rw-r--r--res/layout/filtershow_seekbar.xml5
-rw-r--r--res/layout/photopage_bottom_controls.xml13
-rw-r--r--res/layout/toolbar.xml4
-rw-r--r--res/layout/trim_menu.xml6
-rw-r--r--res/values/dimens.xml3
-rw-r--r--res/values/filtershow_color.xml20
-rw-r--r--res/values/filtershow_styles.xml1
-rw-r--r--res/values/styles.xml19
-rw-r--r--src/com/android/gallery3d/app/AlbumPage.java3
-rw-r--r--src/com/android/gallery3d/app/CommonControllerOverlay.java9
-rw-r--r--src/com/android/gallery3d/app/GestureControllerOverlay.java4
-rw-r--r--src/com/android/gallery3d/app/MovieControllerOverlay.java2
-rw-r--r--src/com/android/gallery3d/app/MovieControllerOverlayNew.java2
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java17
-rw-r--r--src/com/android/gallery3d/app/TrimTimeBar.java17
-rw-r--r--src/com/android/gallery3d/app/TrimVideo.java4
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java7
-rw-r--r--src/com/android/gallery3d/filtershow/ui/ExportDialog.java66
-rw-r--r--src/com/android/gallery3d/ui/MenuExecutor.java15
-rw-r--r--src/com/android/gallery3d/ui/PopupList.java2
34 files changed, 414 insertions, 151 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6a9f1ae97..72a239b3d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -66,6 +66,7 @@
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<activity android:name="com.android.gallery3d.app.MovieActivity"
android:label="@string/movie_view_label"
+ android:theme="@style/Theme.MovieActivity"
android:configChanges="orientation|keyboardHidden|screenSize|keyboard">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@@ -262,6 +263,7 @@
</activity>
<activity android:name="com.android.gallery3d.app.TrimVideo"
android:label="@string/trim_label"
+ android:theme="@style/Theme.MovieActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter android:label="@string/crop_label">
<action android:name="com.android.camera.action.TRIM" />
diff --git a/res/drawable/comparison.xml b/res/drawable/comparison.xml
new file mode 100644
index 000000000..36c5331ea
--- /dev/null
+++ b/res/drawable/comparison.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/comparison_after" />
+ <item android:drawable="@drawable/comparison_before" />
+</selector>
+
diff --git a/res/drawable/ic_video_snapshot.xml b/res/drawable/ic_video_snapshot.xml
index df5b00f5e..a0d7f45e6 100644
--- a/res/drawable/ic_video_snapshot.xml
+++ b/res/drawable/ic_video_snapshot.xml
@@ -35,7 +35,7 @@
android:viewportWidth="108.0">
<path
android:fillColor="#FF000000"
- android:fillAlpha="0.30"
+ android:fillAlpha="0.50"
android:pathData="M54,54m-54,0a54,54 0,1 1,108 0a54,54 0,1 1,-108 0"/>
<path
android:fillColor="#FFFFFFFF"
diff --git a/res/drawable/ic_video_snapshot_padding_pressed.xml b/res/drawable/ic_video_snapshot_padding_pressed.xml
new file mode 100644
index 000000000..a66444db5
--- /dev/null
+++ b/res/drawable/ic_video_snapshot_padding_pressed.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<inset
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/ic_video_snapshot_pressed"
+ android:insetTop="12dp"
+ android:insetRight="12dp"
+ android:insetBottom="12dp"
+ android:insetLeft="12dp"/>
+
diff --git a/res/drawable/ic_video_snapshot_pressed.xml b/res/drawable/ic_video_snapshot_pressed.xml
new file mode 100644
index 000000000..da65406cf
--- /dev/null
+++ b/res/drawable/ic_video_snapshot_pressed.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="36dp"
+ android:width="36dp"
+ android:viewportHeight="108.0"
+ android:viewportWidth="108.0">
+ <path
+ android:fillColor="#FF000000"
+ android:fillAlpha="0.26"
+ android:pathData="M54,54m-54,0a54,54 0,1 1,108 0a54,54 0,1 1,-108 0"/>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M42,36h6v-6h-6V36zM30,72h6v-6h-6V72zM72,30h-6v6h6V30zM60,30h-6v6h6V30zM72,42h-6v6h6V42zM30,60h6v-6h-6V60zM72,66V54h-6v12H54v6h12v10h6V72h10v-6H72zM42,72h6v-6h-6V72zM30,48h6v-6h-6V48zM30,36h6v-6h-6V36z"/>
+</vector>
diff --git a/res/drawable/ic_video_snapshot_selector.xml b/res/drawable/ic_video_snapshot_selector.xml
new file mode 100644
index 000000000..22846e05b
--- /dev/null
+++ b/res/drawable/ic_video_snapshot_selector.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/ic_video_snapshot_padding_pressed"
+ android:state_pressed="true" />
+ <item android:drawable="@drawable/ic_video_snapshot_padding" />
+</selector>
+
diff --git a/res/drawable/truescanner_background.xml b/res/drawable/truescanner_background.xml
new file mode 100644
index 000000000..381bd7fd2
--- /dev/null
+++ b/res/drawable/truescanner_background.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/truescanner" android:state_selected="false"/>
+ <item android:drawable="@drawable/truescanner_select" android:state_selected="true"/>
+</selector> \ No newline at end of file
diff --git a/res/drawable/truescanner_select.xml b/res/drawable/truescanner_select.xml
new file mode 100644
index 000000000..382c14e55
--- /dev/null
+++ b/res/drawable/truescanner_select.xml
@@ -0,0 +1,63 @@
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="32"
+ android:viewportHeight="32">
+
+ <path
+ android:fillColor="#FF4F92E9"
+ android:pathData="M15.1,23.4c0,0.8,0,1.6,0,2.3c-4,0-7.9,0-11.9,0c0-6.7,0-13.4,0-20c4,0,7.9,0,11.9,0c0,0.8,0,1.5,0,2.3
+c-3.2,0-6.4,0-9.6,0c0,5.1,0,10.2,0,15.4C8.7,23.4,11.9,23.4,15.1,23.4z" />
+ <path
+ android:fillColor="#FF4F92E9"
+ android:pathData="M15.1,10c0,0,0,0.1,0,0.1c0,1.9,0,3.7,0,5.6c0,0.1,0,0.2-0.1,0.3c-0.1,0.2-0.2,0.4-0.3,0.6c0,0,0,0.1,0,0.1
+c0.1,0,0.3,0,0.4,0c0,0.8,0,1.5,0,2.2c-0.1,0-0.2,0-0.3,0c-0.3,0-0.7,0-1,0c-0.1,0-0.1,0-0.2,0.1c-0.4,0.8-0.7,1.6-1.1,2.4
+c0,0.1-0.1,0.1-0.1,0.1c-0.9,0-1.8,0-2.8,0c0,0,0,0-0.1,0C11.4,17.7,13.2,13.9,15.1,10C15.1,10,15.1,10,15.1,10z" />
+ <path
+ android:fillColor="#FF4F92E9"
+ android:pathData="M17,16.4c0,4.2,0,8.4,0,12.5c0,0.3-0.2,0.5-0.4,0.5c-0.3,0-0.5-0.2-0.5-0.4c0,0,0-0.1,0-0.1
+c0-8.3,0-16.7,0-25c0-0.1,0-0.2,0-0.2c0.1-0.2,0.3-0.4,0.5-0.3c0.2,0,0.4,0.2,0.4,0.5c0,0,0,0.1,0,0.1C17,8.1,17,12.3,17,16.4z" />
+ <path
+ android:fillColor="#FF4F92E9"
+ android:pathData="M28.7,6.5c0,6.1,0,12.2,0,18.3c-3.4,0-6.9,0-10.3,0c0-0.1,0-0.2,0-0.3c3.3,0,6.7,0,10,0
+c0-5.9,0-11.8,0-17.7c-3.3,0-6.6,0-9.9,0c0-0.1,0-0.2,0-0.3C21.9,6.5,25.3,6.5,28.7,6.5z" />
+ <path
+ android:fillColor="#FF4F92E9"
+ android:pathData="M18,9.6c1.9,4,3.8,8,5.7,12.1c-0.1,0-0.1,0-0.1,0c-1,0-2,0-3,0c-0.1,0-0.1,0-0.2-0.1
+c-0.4-0.8-0.7-1.6-1.1-2.4c0-0.1-0.1-0.1-0.2-0.1c-0.3,0-0.7,0-1,0c0,0-0.1,0-0.1,0c0-0.1,0-0.2,0-0.3c0,0,0.1,0,0.1,0
+c0.4,0,0.9,0,1.3,0c0.1,0,0.1,0,0.2,0.1c0.4,0.8,0.7,1.6,1.1,2.4c0,0.1,0.1,0.1,0.2,0.1c0.8,0,1.5,0,2.3,0c0,0,0.1,0,0.1,0
+c-0.1-0.2-0.2-0.5-0.3-0.7c-1.6-3.3-3.1-6.6-4.7-9.9c0,0,0-0.1,0-0.1C17.9,10.4,17.9,10,18,9.6C18,9.7,18,9.6,18,9.6
+C18,9.6,18,9.6,18,9.6z" />
+ <path
+ android:fillColor="#FF4F92E9"
+ android:pathData="M18.6,16.8c-0.2,0-0.4,0-0.6,0c0-0.1,0-0.2,0-0.3c0,0,0.1,0,0.1,0c-0.2-0.3-0.1-0.7-0.1-1
+C18.2,15.9,18.4,16.4,18.6,16.8z" />
+</vector>
diff --git a/res/layout/filtershow_actionbar.xml b/res/layout/filtershow_actionbar.xml
index a23ca80b7..60088e0a1 100644
--- a/res/layout/filtershow_actionbar.xml
+++ b/res/layout/filtershow_actionbar.xml
@@ -15,6 +15,7 @@
limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:theme="@android:style/Theme.DeviceDefault"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
android:orientation="horizontal">
@@ -23,17 +24,18 @@
android:id="@+id/filtershow_exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:scaleType="fitCenter"
android:src="@drawable/cancel"
android:layout_gravity="left|center_vertical"
- android:paddingStart="6dp" />
+ android:layout_marginStart="@dimen/toolbar_exit_padding_left" />
<TextView
android:id="@+id/filtershow_done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingRight="13dp"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
+ android:layout_marginEnd="13dp"
android:textSize="17sp"
android:text="@string/save"
android:textAllCaps="true"
diff --git a/res/layout/filtershow_actionbar_effects.xml b/res/layout/filtershow_actionbar_effects.xml
index c2b05ebe0..b14a0a766 100644
--- a/res/layout/filtershow_actionbar_effects.xml
+++ b/res/layout/filtershow_actionbar_effects.xml
@@ -29,7 +29,7 @@
android:layout_height="fill_parent"
android:layout_gravity="left|center_vertical"
android:layout_weight=".1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:gravity="center"
android:src="@drawable/cancel"
android:paddingStart="16dp"
@@ -63,7 +63,7 @@
android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical"
android:layout_weight=".1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:gravity="center"
android:src="@drawable/done"
android:paddingEnd="16dp"
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml
index 2a7ea6d33..1c58e1209 100644
--- a/res/layout/filtershow_activity.xml
+++ b/res/layout/filtershow_activity.xml
@@ -54,7 +54,7 @@
android:layout_marginRight="@dimen/compare_margin_right"
android:layout_marginTop="@dimen/compare_margin_top"
android:background="@android:color/transparent"
- android:src="@drawable/comparison_before"
+ android:src="@drawable/comparison"
android:visibility="visible" />
</RelativeLayout>
diff --git a/res/layout/filtershow_bottom_panel.xml b/res/layout/filtershow_bottom_panel.xml
index 80efe1a08..81a9d967b 100644
--- a/res/layout/filtershow_bottom_panel.xml
+++ b/res/layout/filtershow_bottom_panel.xml
@@ -29,6 +29,7 @@
-->
<com.android.gallery3d.filtershow.CenteredLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:theme="@android:style/Theme.DeviceDefault"
android:id="@+id/bottom_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -47,7 +48,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:scaleType="centerInside"
android:src="@drawable/color_background" />
@@ -56,7 +57,7 @@
android:layout_width="@dimen/thumbnail_size"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/frames_background"
@@ -67,7 +68,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/crop_background" />
@@ -77,7 +78,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/exposure_background" />
@@ -87,7 +88,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/beautify_background"
@@ -98,7 +99,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/dualcamera_background"
@@ -109,17 +110,17 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
- android:src="@drawable/truescanner" />
+ android:src="@drawable/truescanner_background" />
<ImageButton
android:id="@+id/hazeBusterButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/hazebuster" />
@@ -129,7 +130,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:padding="2dip"
android:scaleType="centerInside"
android:src="@drawable/seestraight" />
diff --git a/res/layout/filtershow_category_geometry_panel.xml b/res/layout/filtershow_category_geometry_panel.xml
index e66aa12a4..50515d6ac 100644
--- a/res/layout/filtershow_category_geometry_panel.xml
+++ b/res/layout/filtershow_category_geometry_panel.xml
@@ -29,6 +29,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:theme="@android:style/Theme.DeviceDefault"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
@@ -54,7 +55,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/crop_icon_size"
android:scaleType="centerInside"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:layout_marginTop="@dimen/crop_icon_margin_padding" />
<TextView
@@ -83,7 +84,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/crop_icon_size"
android:scaleType="centerInside"
- android:background="@android:color/transparent"
+ android:background="?android:attr/actionBarItemBackground"
android:layout_marginTop="@dimen/crop_icon_margin_padding" />
<TextView
@@ -113,7 +114,7 @@
android:layout_height="@dimen/crop_icon_size"
android:scaleType="centerInside"
android:layout_marginTop="@dimen/crop_icon_margin_padding"
- android:background="@android:color/transparent" />
+ android:background="?android:attr/actionBarItemBackground" />
<TextView
android:id="@+id/rightText"
diff --git a/res/layout/filtershow_export_dialog.xml b/res/layout/filtershow_export_dialog.xml
index 3b41ddaa4..394a89f2e 100644
--- a/res/layout/filtershow_export_dialog.xml
+++ b/res/layout/filtershow_export_dialog.xml
@@ -19,15 +19,12 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:divider="?android:dividerVertical"
- android:showDividers="middle">
+ android:padding="?android:attr/dialogPreferredPadding" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|center_vertical"
- android:layout_margin="7dp"
- android:paddingStart="8dp"
android:textSize="16sp"
android:textColor="@color/albumset_label_background"
android:text="@string/select_output_settings"/>
@@ -37,16 +34,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alignmentMode="alignBounds"
- android:useDefaultMargins="true"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="8dp"
android:columnOrderPreserved="false"
android:columnCount="5">
<TextView
android:text="@string/size"
- android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
android:layout_gravity="start|center_vertical"
- android:paddingStart="8dp"
android:textSize="16sp"
android:textColor="@color/albumlist_label_title"/>
@@ -71,13 +66,13 @@
<TextView
android:id="@+id/estimadedSize"
- android:layout_marginEnd="8dp"
android:layout_gravity="end|center_vertical"
android:textSize="16sp"
android:textColor="@color/albumlist_label_title"/>
<LinearLayout
android:layout_columnSpan="5"
+ android:layout_marginTop="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -85,13 +80,11 @@
android:text="@string/quality"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
- android:layout_margin="8dp"
android:textSize="16sp"
android:textColor="@color/albumlist_label_title" />
<SeekBar
android:id="@+id/qualitySeekBar"
- android:layout_margin="8dp"
android:layout_gravity="center"
android:max="100"
android:progress="100"
@@ -105,43 +98,9 @@
android:id="@+id/qualityTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="8dp"
android:textSize="16sp"
android:textColor="@color/albumlist_label_title"
- android:layout_gravity="end|center_vertical"
- />
-
+ android:layout_gravity="end|center_vertical" />
</LinearLayout>
-
-
</GridLayout>
-
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="48dp"
- style="?android:attr/buttonBarStyle"
- android:gravity="right">
-
- <Button
- android:id="@+id/cancel"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:text="@string/cancel"
- android:textSize="14sp"
- android:layout_marginRight="8dp"
- style="?android:attr/buttonBarButtonStyle"
- android:textColor="#009688"/>
-
- <Button
- android:id="@+id/done"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:textSize="14sp"
- android:text="@string/done"
- style="?android:attr/buttonBarButtonStyle"
- android:textColor="#009688"/>
-
- </LinearLayout>
-
</LinearLayout>
diff --git a/res/layout/filtershow_seekbar.xml b/res/layout/filtershow_seekbar.xml
index 216b72a9c..8cb5cd979 100644
--- a/res/layout/filtershow_seekbar.xml
+++ b/res/layout/filtershow_seekbar.xml
@@ -16,6 +16,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:theme="@android:style/Theme.DeviceDefault"
android:id="@+id/top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -28,7 +29,7 @@
android:layout_height="60dp"
android:src="@drawable/cancel"
android:layout_gravity="center_vertical"
- android:background="@android:color/transparent" />
+ android:background="?android:attr/actionBarItemBackground" />
<SeekBar
android:id="@+id/primarySeekBar"
@@ -47,6 +48,6 @@
android:layout_height="60dp"
android:src="@drawable/done"
android:layout_gravity="center_vertical"
- android:background="@android:color/transparent" />
+ android:background="?android:attr/actionBarItemBackground" />
</LinearLayout>
diff --git a/res/layout/photopage_bottom_controls.xml b/res/layout/photopage_bottom_controls.xml
index f52a704a7..cd8e8a7d2 100644
--- a/res/layout/photopage_bottom_controls.xml
+++ b/res/layout/photopage_bottom_controls.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/photopage_bottom_controls"
+ android:theme="@android:style/Theme.DeviceDefault"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
@@ -13,30 +14,30 @@
<ImageButton
android:id="@+id/photopage_bottom_control_edit"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1"
- android:background="@null"
+ android:background="?android:attr/actionBarItemBackground"
android:src="@drawable/edit"
android:visibility="gone" />
<ImageButton
android:id="@+id/photopage_bottom_control_share"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1"
- android:background="@null"
+ android:background="?android:attr/actionBarItemBackground"
android:src="@drawable/share"
android:visibility="gone" />
<ImageButton
android:id="@+id/photopage_bottom_control_delete"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_weight="1"
- android:background="@null"
+ android:background="?android:attr/actionBarItemBackground"
android:src="@drawable/delete"
android:visibility="gone" />
diff --git a/res/layout/toolbar.xml b/res/layout/toolbar.xml
index 5616f1fcb..054d97c84 100644
--- a/res/layout/toolbar.xml
+++ b/res/layout/toolbar.xml
@@ -31,8 +31,8 @@
<Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
- android:paddingTop="30dp"
- android:background="#e53935"
+ android:paddingTop="26dp"
+ android:background="@color/toolbar_theme"
android:elevation="4dp"
android:theme="@style/ToolbarTheme"
android:titleTextAppearance="@style/ToolbarTitleStyle"
diff --git a/res/layout/trim_menu.xml b/res/layout/trim_menu.xml
index 164264546..79a0f8808 100644
--- a/res/layout/trim_menu.xml
+++ b/res/layout/trim_menu.xml
@@ -20,17 +20,19 @@
android:layout_centerVertical="true">
<ImageView
android:id="@+id/exit_trim"
+ android:background="?android:attr/actionBarItemBackground"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/cancel"/>
<TextView
android:id="@+id/start_trim"
+ android:background="?android:attr/selectableItemBackgroundBorderless"
android:layout_marginStart="8dp"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
android:text="@string/save"
android:textAllCaps="true"
- android:layout_gravity="right"
+ android:layout_gravity="end|center_vertical"
android:textSize="16sp"
android:textColor="@color/primary_text"
android:gravity="left|center_vertical"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 845c53dd3..aa7da66eb 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -184,7 +184,7 @@
<dimen name="timeline_grid_vertical_space">3dp</dimen>
<dimen name="slot_width">174dp</dimen>
<dimen name="slot_height">174dp</dimen>
- <dimen name="toolbar_height">84dp</dimen>
+ <dimen name="toolbar_height">80dp</dimen>
<dimen name="slot_width_album">116dp</dimen>
<dimen name="slot_height_album">116dp</dimen>
<dimen name="crop_icon_size">30dp</dimen>
@@ -231,4 +231,5 @@
<dimen name="controller_indicator_text_size">16sp</dimen>
<dimen name="toolbar_title_text_size">20dp</dimen>
+ <dimen name="toolbar_exit_padding_left">16dp</dimen>
</resources>
diff --git a/res/values/filtershow_color.xml b/res/values/filtershow_color.xml
index 70a1e7336..b1d4111c2 100644
--- a/res/values/filtershow_color.xml
+++ b/res/values/filtershow_color.xml
@@ -52,16 +52,16 @@
<color name="filtershow_image_mask">#4d000000</color>
<color name="filtershow_info_text">#DE000000</color>
- <color name="filtershow_color_none">#5c5c5c</color>
- <color name="filtershow_color_punch">#c6bcc6</color>
- <color name="filtershow_color_vintage">#bb9e61</color>
- <color name="filtershow_color_bw">#000000</color>
- <color name="filtershow_color_bleach">#676f82</color>
- <color name="filtershow_color_instant">#e1d08b</color>
- <color name="filtershow_color_latte">#b18f7c</color>
- <color name="filtershow_color_blue">#5d6299</color>
- <color name="filtershow_color_litho">#c7c4b7</color>
- <color name="filtershow_color_xprocess">#409797</color>
+ <color name="filtershow_color_none">#80000000</color>
+ <color name="filtershow_color_punch">#80000000</color>
+ <color name="filtershow_color_vintage">#80000000</color>
+ <color name="filtershow_color_bw">#80000000</color>
+ <color name="filtershow_color_bleach">#80000000</color>
+ <color name="filtershow_color_instant">#80000000</color>
+ <color name="filtershow_color_latte">#80000000</color>
+ <color name="filtershow_color_blue">#80000000</color>
+ <color name="filtershow_color_litho">#80000000</color>
+ <color name="filtershow_color_xprocess">#80000000</color>
<color name="iconview_bottom_color">#80000000</color>
<color name="bottom_panel_background_color">#A5000000</color>
diff --git a/res/values/filtershow_styles.xml b/res/values/filtershow_styles.xml
index 974b81318..e8dd11040 100644
--- a/res/values/filtershow_styles.xml
+++ b/res/values/filtershow_styles.xml
@@ -61,6 +61,7 @@
<item name="android:thumb">@drawable/adjust</item>
<item name="android:thumbOffset">0dip</item>
<item name="android:focusable">true</item>
+ <item name="android:background">@null</item>
</style>
</resources> \ No newline at end of file
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c3db0f362..dc4b9ae7d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -30,12 +30,18 @@
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowActionModeOverlay">true</item>
- <item name="android:actionOverflowButtonStyle">@style/EditOverflow</item>
+ <item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item>
<item name="android:logo">@android:color/transparent</item>
</style>
<style name="Theme.FilterShow" parent="Theme.Gallery">
<item name="android:windowBackground">@null</item>
<item name="android:actionBarStyle">@style/FilterShowActionBar</item>
+ <item name="android:toolbarStyle">@style/FilterShowToolbar</item>
+ </style>
+ <style name="FilterShowToolbar" parent="@android:style/Widget.Toolbar">
+ <item name="android:contentInsetStart">0dp</item>
+ </style>
+ <style name="Theme.MovieActivity" parent="android:Theme.DeviceDefault.Light.DarkActionBar">
</style>
<style name="Theme.Crop" parent="Theme.GalleryBase">
<item name="android:displayOptions"></item>
@@ -324,7 +330,9 @@
<item name="android:statusBarColor">#ab5810</item>
</style>
- <style name="ToolbarTheme" parent="android:Theme.Material"/>
+ <style name="ToolbarTheme" parent="android:Theme.Material" >
+ <item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item>
+ </style>
<style name="ToolbarTitleStyle" parent="android:TextAppearance.Material.Widget.Toolbar.Title">
<item name="android:textSize">@dimen/toolbar_title_text_size</item>
@@ -333,13 +341,14 @@
<style name="ToolbarPopUpTheme" parent="android:Theme.Material.Light" />
<!-- Styles -->
- <style name="MyOverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
+ <style name="MyOverFlow" parent="@android:style/Widget.DeviceDefault.ActionButton">
<item name="android:src">@drawable/multiselect_more</item>
</style>
- <style name="EditOverflow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
+ <style name="WhiteOverflow" parent="@android:style/Widget.DeviceDefault.ActionButton">
<item name="android:src">@drawable/more</item>
</style>
- <style name="FilterShowActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
+ <style name="FilterShowActionBar" parent="@android:style/Widget.DeviceDefault.Light.ActionBar">
<item name="android:background">@color/edit_actionbar_background</item>
+ <item name="android:contentInsetStart">0dp</item>
</style>
</resources>
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java
index 05cc1f8a1..0ff76e751 100644
--- a/src/com/android/gallery3d/app/AlbumPage.java
+++ b/src/com/android/gallery3d/app/AlbumPage.java
@@ -529,9 +529,6 @@ public class AlbumPage extends ActivityState implements GalleryActionBar.Cluster
super.onPause();
mIsActive = false;
- if (mSelectionManager.inSelectionMode()) {
- mSelectionManager.leaveSelectionMode();
- }
mAlbumView.setSlotFilter(null);
mActionModeHandler.pause();
mAlbumDataAdapter.pause();
diff --git a/src/com/android/gallery3d/app/CommonControllerOverlay.java b/src/com/android/gallery3d/app/CommonControllerOverlay.java
index 1c8287414..f4fbeb868 100644
--- a/src/com/android/gallery3d/app/CommonControllerOverlay.java
+++ b/src/com/android/gallery3d/app/CommonControllerOverlay.java
@@ -18,7 +18,9 @@ package com.android.gallery3d.app;
import android.content.Context;
import android.content.res.Resources;
+import android.content.res.TypedArray;
import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -108,6 +110,13 @@ public abstract class CommonControllerOverlay extends FrameLayout implements
mPlayPauseReplayView.setFocusable(true);
mPlayPauseReplayView.setClickable(true);
mPlayPauseReplayView.setOnClickListener(this);
+ TypedArray array = context.getTheme().obtainStyledAttributes(new int[] {
+ android.R.attr.actionBarItemBackground
+ });
+ Drawable drawable = array.getDrawable(array.getIndex(0));
+ if (drawable != null) {
+ mPlayPauseReplayView.setBackground(drawable);
+ }
addView(mPlayPauseReplayView, wrapContent);
mErrorView = createOverlayTextView(context);
diff --git a/src/com/android/gallery3d/app/GestureControllerOverlay.java b/src/com/android/gallery3d/app/GestureControllerOverlay.java
index 38b7f0d65..c7f497d16 100644
--- a/src/com/android/gallery3d/app/GestureControllerOverlay.java
+++ b/src/com/android/gallery3d/app/GestureControllerOverlay.java
@@ -49,9 +49,8 @@ public class GestureControllerOverlay extends FrameLayout implements
ControllerOverlay, GestureController.GestureControlListener {
private GestureController mGestureController;
- private static final int MAX_VIDEO_STEP_TIME = 2 * 60 * 1000;
+ private static final int MAX_VIDEO_STEP_TIME = 60 * 1000;
private static final int MAX_BRIGHTNESS = 100;
- private static final int INDICATOR_FADE_OUT_TIME = 200; // millisecond
private float mStartBrightness = -1.0f;
private double mStartVolumePercent = -1.0f;
@@ -130,6 +129,7 @@ public class GestureControllerOverlay extends FrameLayout implements
mCurrentIndicator.setPadding(paddingH, paddingV, paddingH, paddingV);
mCurrentIndicator.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM);
mCurrentIndicator.setTextSize(TypedValue.COMPLEX_UNIT_PX, mIndicatorTextSize);
+ mCurrentIndicator.setTextColor(Color.WHITE);
mCurrentIndicator.setMinWidth(mIndicatorWidth);
addView(mCurrentIndicator, layoutParams);
mCurrentIndicator.setVisibility(INVISIBLE);
diff --git a/src/com/android/gallery3d/app/MovieControllerOverlay.java b/src/com/android/gallery3d/app/MovieControllerOverlay.java
index 80a7fc6aa..c1e36487d 100644
--- a/src/com/android/gallery3d/app/MovieControllerOverlay.java
+++ b/src/com/android/gallery3d/app/MovieControllerOverlay.java
@@ -664,7 +664,7 @@ public class MovieControllerOverlay extends CommonControllerOverlay implements
LayoutParams wrapContent =
new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
// add screenView
- mScreenView = new ImageView(context);
+ mScreenView = new ImageView(context, null, android.R.attr.actionButtonStyle);
// default next screen mode
mScreenView.setImageResource(R.drawable.ic_media_fullscreen);
mScreenView.setScaleType(ScaleType.CENTER);
diff --git a/src/com/android/gallery3d/app/MovieControllerOverlayNew.java b/src/com/android/gallery3d/app/MovieControllerOverlayNew.java
index 824f8a469..6b32c142a 100644
--- a/src/com/android/gallery3d/app/MovieControllerOverlayNew.java
+++ b/src/com/android/gallery3d/app/MovieControllerOverlayNew.java
@@ -164,7 +164,7 @@ public class MovieControllerOverlayNew extends MovieControllerOverlay {
LayoutParams wrapContent =
new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
mVideoSnapshotButton = new ImageView(context);
- mVideoSnapshotButton.setImageResource(R.drawable.ic_video_snapshot_padding);
+ mVideoSnapshotButton.setImageResource(R.drawable.ic_video_snapshot_selector);
mVideoSnapshotButton.setScaleType(ImageView.ScaleType.CENTER);
mVideoSnapshotButton.setFocusable(true);
mVideoSnapshotButton.setClickable(true);
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index cdbe3e7e4..df3229f95 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -23,6 +23,7 @@ import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.net.Uri;
@@ -75,6 +76,7 @@ import com.android.gallery3d.ui.SynchronizedHandler;
import com.android.gallery3d.util.GalleryUtils;
import com.android.gallery3d.util.UsageStatistics;
+import java.util.List;
import java.util.Locale;
//import android.drm.DrmHelper;
@@ -775,9 +777,18 @@ public abstract class PhotoPage extends ActivityState implements
}
intent.putExtra(FilterShowActivity.LAUNCH_FULLSCREEN,
mActivity.isFullscreen());
- ((Activity) mActivity).startActivityForResult(Intent.createChooser(intent, null),
- REQUEST_EDIT);
- overrideTransitionToEditor();
+
+ List<ResolveInfo> resolveInfoList = mActivity.getPackageManager()
+ .queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
+ if (resolveInfoList != null && resolveInfoList.size() > 0) {
+ if (resolveInfoList.size() == 1) {
+ // only one app can resolve intent, don't use createChooser.
+ mActivity.startActivityForResult(intent, REQUEST_EDIT);
+ } else {
+ mActivity.startActivityForResult(Intent.createChooser(intent, null), REQUEST_EDIT);
+ }
+ overrideTransitionToEditor();
+ }
}
private void launchSimpleEditor() {
diff --git a/src/com/android/gallery3d/app/TrimTimeBar.java b/src/com/android/gallery3d/app/TrimTimeBar.java
index 06e8741bb..6fea3d690 100644
--- a/src/com/android/gallery3d/app/TrimTimeBar.java
+++ b/src/com/android/gallery3d/app/TrimTimeBar.java
@@ -83,11 +83,11 @@ public class TrimTimeBar extends TimeBar {
}
private int trimStartScrubberTipOffset() {
- return mTrimStartScrubber.getWidth() * 3 / 4;
+ return mTrimStartScrubber.getWidth();
}
private int trimEndScrubberTipOffset() {
- return mTrimEndScrubber.getWidth() / 4;
+ return 0;
}
// Based on all the time info (current, total, trimStart, trimEnd), we
@@ -153,9 +153,10 @@ public class TrimTimeBar extends TimeBar {
}
private boolean inScrubber(float x, float y, int startX, int startY, Bitmap scrubber) {
- int scrubberRight = startX + scrubber.getWidth();
- int scrubberBottom = startY + scrubber.getHeight();
- return startX < x && x < scrubberRight && startY < y && y < scrubberBottom;
+ int scrubberRight = startX + scrubber.getWidth() * 2;
+ int scrubberBottom = startY + scrubber.getHeight() * 2;
+ return startX - mScrubberPadding < x && x < scrubberRight + mScrubberPadding
+ && startY - mScrubberPadding < y && y < scrubberBottom + mScrubberPadding;
}
private int clampScrubber(int scrubberLeft, int offset, int lowerBound, int upperBound) {
@@ -182,12 +183,12 @@ public class TrimTimeBar extends TimeBar {
}
margin = mLayoutExt.getProgressMargin(margin);
int progressY = (h + mScrubberPadding) / 2;
- mTrimStartScrubberTop = progressY;
- mTrimEndScrubberTop = progressY;
mScrubberTop = progressY - mScrubber.getHeight() / 2 + 1;
mProgressBar.set(
mTimeBarMargin + margin, progressY,
w - mTimeBarMargin - margin, progressY + 6);
+ mTrimStartScrubberTop = progressY + mProgressBar.height();
+ mTrimEndScrubberTop = progressY + mProgressBar.height();
}
update();
}
@@ -341,6 +342,6 @@ public class TrimTimeBar extends TimeBar {
break;
}
}
- return false;
+ return true;
}
}
diff --git a/src/com/android/gallery3d/app/TrimVideo.java b/src/com/android/gallery3d/app/TrimVideo.java
index d2d6cd336..ec85de234 100644
--- a/src/com/android/gallery3d/app/TrimVideo.java
+++ b/src/com/android/gallery3d/app/TrimVideo.java
@@ -122,7 +122,7 @@ public class TrimVideo extends Activity implements
trimVideo();
}
});
- mSaveVideoTextView.setEnabled(false);
+ mSaveVideoTextView.setVisibility(View.GONE);
Intent intent = getIntent();
mUri = intent.getData();
@@ -232,7 +232,7 @@ public class TrimVideo extends Activity implements
}
mController.setTimes(mVideoPosition, duration, mTrimStartTime, mTrimEndTime);
// Enable save if there's modifications
- mSaveVideoTextView.setEnabled(isModified());
+ mSaveVideoTextView.setVisibility(isModified() ? View.VISIBLE : View.GONE);
return mVideoPosition;
}
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java b/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
index cec45f15f..d83c0ad75 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
@@ -29,6 +29,7 @@ import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.MotionEvent;
+import org.codeaurora.gallery.R;
import com.android.gallery3d.filtershow.crop.CropDrawingUtils;
import com.android.gallery3d.filtershow.editors.EditorStraighten;
import com.android.gallery3d.filtershow.filters.FilterCropRepresentation;
@@ -257,9 +258,11 @@ public class ImageStraighten extends ImageShow {
int viewWidth = canvas.getWidth();
int viewHeight = canvas.getHeight();
+ int panelHeight = getContext().getResources().getDimensionPixelOffset(
+ R.dimen.category_actionbar_panel_height);
// Get matrix for drawing bitmap
Matrix m = GeometryMathUtils.getFullGeometryToScreenMatrix(mDrawHolder, imageWidth,
- imageHeight, viewWidth, viewHeight);
+ imageHeight, viewWidth, viewHeight - panelHeight);
mPaint.reset();
mPaint.setAntiAlias(true);
mPaint.setFilterBitmap(true);
@@ -270,7 +273,7 @@ public class ImageStraighten extends ImageShow {
mPaint.setStrokeWidth(2);
mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
updateCurrentCrop(m, mDrawHolder, mDrawRect, imageWidth,
- imageHeight, viewWidth, viewHeight);
+ imageHeight, viewWidth, viewHeight - panelHeight);
if (mFirstDrawSinceUp) {
mPriorCropAtUp.set(mCrop);
mLocalRep.setStraighten(mAngle);
diff --git a/src/com/android/gallery3d/filtershow/ui/ExportDialog.java b/src/com/android/gallery3d/filtershow/ui/ExportDialog.java
index d9e695cfb..6ec3cfed5 100644
--- a/src/com/android/gallery3d/filtershow/ui/ExportDialog.java
+++ b/src/com/android/gallery3d/filtershow/ui/ExportDialog.java
@@ -16,6 +16,9 @@
package com.android.gallery3d.filtershow.ui;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Rect;
@@ -27,7 +30,6 @@ import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.SeekBar;
import android.widget.TextView;
@@ -42,8 +44,7 @@ import com.android.gallery3d.filtershow.tools.SaveImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
-public class ExportDialog extends DialogFragment implements View.OnClickListener,
- SeekBar.OnSeekBarChangeListener {
+public class ExportDialog extends DialogFragment implements SeekBar.OnSeekBarChangeListener {
SeekBar mSeekBar;
TextView mSeekVal;
EditText mWidthText;
@@ -90,11 +91,37 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener
}
@Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
mHandler = new Handler(getActivity().getMainLooper());
+ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ View view = initCustomLayout();
+ builder.setView(view);
+ builder.setTitle(R.string.export_flattened);
+ builder.setPositiveButton(R.string.done,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int id) {
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ Uri sourceUri = MasterImage.getImage().getUri();
+ File dest = SaveImage.getNewFile(activity, activity.getSelectedImageUri());
+ float scaleFactor = mExportWidth / (float) mOriginalBounds.width();
+ Intent processIntent = ProcessingService.getSaveIntent(activity,
+ MasterImage.getImage().getPreset(), dest,
+ activity.getSelectedImageUri(), sourceUri, true,
+ mSeekBar.getProgress(), scaleFactor, false, -1);
+ activity.startService(processIntent);
+ }
+ });
+ builder.setNegativeButton(R.string.cancel, null);
- View view = inflater.inflate(R.layout.filtershow_export_dialog, container);
+ updateCompressionFactor();
+ updateSize();
+ return builder.create();
+ }
+
+ private View initCustomLayout() {
+ LayoutInflater inflater = getActivity().getLayoutInflater();
+ View view = inflater.inflate(R.layout.filtershow_export_dialog, null);
mSeekBar = (SeekBar) view.findViewById(R.id.qualitySeekBar);
mSeekVal = (TextView) view.findViewById(R.id.qualityTextView);
mSliderLabel = getString(R.string.quality) + ": ";
@@ -124,13 +151,6 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener
mExportHeight = mOriginalBounds.height();
mWidthText.addTextChangedListener(new Watcher(mWidthText));
mHeightText.addTextChangedListener(new Watcher(mHeightText));
-
- view.findViewById(R.id.cancel).setOnClickListener(this);
- view.findViewById(R.id.done).setOnClickListener(this);
- getDialog().setTitle(R.string.export_flattened);
-
- updateCompressionFactor();
- updateSize();
return view;
}
@@ -156,26 +176,6 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener
mHandler.postDelayed(mUpdateRunnable, mUpdateDelay);
}
- @Override
- public void onClick(View v) {
- switch (v.getId()) {
- case R.id.cancel:
- dismiss();
- break;
- case R.id.done:
- FilterShowActivity activity = (FilterShowActivity) getActivity();
- Uri sourceUri = MasterImage.getImage().getUri();
- File dest = SaveImage.getNewFile(activity, activity.getSelectedImageUri());
- float scaleFactor = mExportWidth / (float) mOriginalBounds.width();
- Intent processIntent = ProcessingService.getSaveIntent(activity, MasterImage
- .getImage().getPreset(), dest, activity.getSelectedImageUri(), sourceUri,
- true, mSeekBar.getProgress(), scaleFactor, false, -1);
- activity.startService(processIntent);
- dismiss();
- break;
- }
- }
-
public void updateCompressionFactor() {
Bitmap bitmap = MasterImage.getImage().getFilteredImage();
if (bitmap == null) {
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java
index c28fd097b..c57e848e3 100644
--- a/src/com/android/gallery3d/ui/MenuExecutor.java
+++ b/src/com/android/gallery3d/ui/MenuExecutor.java
@@ -25,6 +25,8 @@ import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
//import android.drm.DrmHelper;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
@@ -46,6 +48,7 @@ import com.android.gallery3d.util.ThreadPool.Job;
import com.android.gallery3d.util.ThreadPool.JobContext;
import java.util.ArrayList;
+import java.util.List;
public class MenuExecutor {
private static final String TAG = "MenuExecutor";
@@ -254,7 +257,17 @@ public class MenuExecutor {
Intent intent = getIntentBySingleSelectedPath(Intent.ACTION_EDIT);
if (intent != null) {
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- ((Activity) mActivity).startActivity(Intent.createChooser(intent, null));
+
+ List<ResolveInfo> resolveInfoList = mActivity.getPackageManager()
+ .queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
+ if (resolveInfoList != null && resolveInfoList.size() > 0) {
+ if (resolveInfoList.size() == 1) {
+ // only one app can resolve intent, don't use createChooser.
+ mActivity.startActivity(intent);
+ } else {
+ mActivity.startActivity(Intent.createChooser(intent, null));
+ }
+ }
}
return;
}
diff --git a/src/com/android/gallery3d/ui/PopupList.java b/src/com/android/gallery3d/ui/PopupList.java
index efbddd3ea..a9aa2570f 100644
--- a/src/com/android/gallery3d/ui/PopupList.java
+++ b/src/com/android/gallery3d/ui/PopupList.java
@@ -154,7 +154,7 @@ public class PopupList {
}
private PopupWindow createPopupWindow() {
- PopupWindow popup = new PopupWindow(mContext);
+ PopupWindow popup = new PopupWindow(mContext, null, android.R.attr.popupMenuStyle);
popup.setOnDismissListener(mOnDismissListener);
popup.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#ffffff")));