Gallery: UX enhancement
Added new resources and modified source
to enhance the UI of Gallery application.
CRs-Fixed: 926603
Change-Id: I5ca7c49115ab4a3531b72a53380bb765d52707a2
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 01d6123..93b0158 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -24,7 +24,7 @@
<original-package android:name="com.android.gallery3d" />
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
+ <uses-sdk android:minSdkVersion="18" android:targetSdkVersion="18"/>
<permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER"
android:protectionLevel="signatureOrSystem" />
@@ -59,7 +59,6 @@
<application android:icon="@mipmap/ic_launcher_gallery" android:label="@string/app_name"
android:name="com.android.gallery3d.app.GalleryAppImpl"
- android:theme="@style/Theme.Gallery"
android:logo="@mipmap/ic_launcher_gallery"
android:hardwareAccelerated="true"
android:largeHeap="true"
@@ -118,7 +117,8 @@
</intent-filter>
</activity>
- <activity android:name="com.android.gallery3d.app.GalleryActivity" android:label="@string/app_name"
+ <activity android:name="com.android.gallery3d.app.GalleryActivity"
+ android:theme="@style/AppTheme"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -292,7 +292,6 @@
<activity
android:name="com.android.gallery3d.filtershow.FilterShowActivity"
- android:label="@string/title_activity_filter_show"
android:theme="@style/Theme.FilterShow"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
@@ -399,6 +398,7 @@
<service android:name="com.android.camera.MediaSaveService" />
<activity android:name="org.codeaurora.gallery3d.video.SettingsActivity"
+ android:theme="@android:style/Theme.Material.Light"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/streaming_settings" >
<intent-filter>
@@ -426,6 +426,7 @@
</activity>
<activity android:name="org.codeaurora.gallery3d.video.VideoSettingsActivity"
android:label="@string/movie_view_label"
+ android:theme="@android:style/Theme.Material.Light"
android:configChanges="orientation|keyboardHidden|screenSize|mnc|mcc">
</activity>
</application>
diff --git a/res/drawable-hdpi/blur.png b/res/drawable-hdpi/blur.png
new file mode 100644
index 0000000..b767b1b
--- /dev/null
+++ b/res/drawable-hdpi/blur.png
Binary files differ
diff --git a/res/drawable-hdpi/drawer_bg.png b/res/drawable-hdpi/drawer_bg.png
new file mode 100644
index 0000000..d7dd7a6
--- /dev/null
+++ b/res/drawable-hdpi/drawer_bg.png
Binary files differ
diff --git a/res/drawable-hdpi/feather.png b/res/drawable-hdpi/feather.png
new file mode 100644
index 0000000..02bd370
--- /dev/null
+++ b/res/drawable-hdpi/feather.png
Binary files differ
diff --git a/res/drawable-hdpi/focus.png b/res/drawable-hdpi/focus.png
new file mode 100644
index 0000000..a168a05
--- /dev/null
+++ b/res/drawable-hdpi/focus.png
Binary files differ
diff --git a/res/drawable-hdpi/fusion.png b/res/drawable-hdpi/fusion.png
new file mode 100644
index 0000000..7abeb24
--- /dev/null
+++ b/res/drawable-hdpi/fusion.png
Binary files differ
diff --git a/res/drawable-hdpi/halo.png b/res/drawable-hdpi/halo.png
new file mode 100644
index 0000000..f32da85
--- /dev/null
+++ b/res/drawable-hdpi/halo.png
Binary files differ
diff --git a/res/drawable-hdpi/multiselect.png b/res/drawable-hdpi/multiselect.png
new file mode 100644
index 0000000..59c8eee
--- /dev/null
+++ b/res/drawable-hdpi/multiselect.png
Binary files differ
diff --git a/res/drawable-hdpi/none.png b/res/drawable-hdpi/none.png
new file mode 100644
index 0000000..58a7fd8
--- /dev/null
+++ b/res/drawable-hdpi/none.png
Binary files differ
diff --git a/res/drawable-hdpi/play_detail.png b/res/drawable-hdpi/play_detail.png
new file mode 100644
index 0000000..21060fc
--- /dev/null
+++ b/res/drawable-hdpi/play_detail.png
Binary files differ
diff --git a/res/drawable-hdpi/random.png b/res/drawable-hdpi/random.png
new file mode 100644
index 0000000..3ae23df
--- /dev/null
+++ b/res/drawable-hdpi/random.png
Binary files differ
diff --git a/res/drawable-hdpi/rectangle.png b/res/drawable-hdpi/rectangle.png
new file mode 100644
index 0000000..10c0e9a
--- /dev/null
+++ b/res/drawable-hdpi/rectangle.png
Binary files differ
diff --git a/res/drawable-hdpi/round.png b/res/drawable-hdpi/round.png
new file mode 100644
index 0000000..d9014c0
--- /dev/null
+++ b/res/drawable-hdpi/round.png
Binary files differ
diff --git a/res/drawable-hdpi/sketch.png b/res/drawable-hdpi/sketch.png
new file mode 100644
index 0000000..f43f6ac
--- /dev/null
+++ b/res/drawable-hdpi/sketch.png
Binary files differ
diff --git a/res/drawable-hdpi/square.png b/res/drawable-hdpi/square.png
new file mode 100644
index 0000000..9b744ba
--- /dev/null
+++ b/res/drawable-hdpi/square.png
Binary files differ
diff --git a/res/drawable-xhdpi/blur.png b/res/drawable-xhdpi/blur.png
new file mode 100644
index 0000000..279848e
--- /dev/null
+++ b/res/drawable-xhdpi/blur.png
Binary files differ
diff --git a/res/drawable-xhdpi/drawer_bg.png b/res/drawable-xhdpi/drawer_bg.png
new file mode 100644
index 0000000..5640493
--- /dev/null
+++ b/res/drawable-xhdpi/drawer_bg.png
Binary files differ
diff --git a/res/drawable-xhdpi/feather.png b/res/drawable-xhdpi/feather.png
new file mode 100644
index 0000000..d622a2f
--- /dev/null
+++ b/res/drawable-xhdpi/feather.png
Binary files differ
diff --git a/res/drawable-xhdpi/focus.png b/res/drawable-xhdpi/focus.png
new file mode 100644
index 0000000..ea695b4
--- /dev/null
+++ b/res/drawable-xhdpi/focus.png
Binary files differ
diff --git a/res/drawable-xhdpi/fusion.png b/res/drawable-xhdpi/fusion.png
new file mode 100644
index 0000000..158fcbb
--- /dev/null
+++ b/res/drawable-xhdpi/fusion.png
Binary files differ
diff --git a/res/drawable-xhdpi/halo.png b/res/drawable-xhdpi/halo.png
new file mode 100644
index 0000000..8047a73
--- /dev/null
+++ b/res/drawable-xhdpi/halo.png
Binary files differ
diff --git a/res/drawable-xhdpi/multiselect.png b/res/drawable-xhdpi/multiselect.png
new file mode 100644
index 0000000..41ecb89
--- /dev/null
+++ b/res/drawable-xhdpi/multiselect.png
Binary files differ
diff --git a/res/drawable-xhdpi/normal.png b/res/drawable-xhdpi/normal.png
new file mode 100644
index 0000000..91cb739
--- /dev/null
+++ b/res/drawable-xhdpi/normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/play_detail.png b/res/drawable-xhdpi/play_detail.png
new file mode 100644
index 0000000..d8999dc
--- /dev/null
+++ b/res/drawable-xhdpi/play_detail.png
Binary files differ
diff --git a/res/drawable-xhdpi/random.png b/res/drawable-xhdpi/random.png
new file mode 100644
index 0000000..ca6b3f2
--- /dev/null
+++ b/res/drawable-xhdpi/random.png
Binary files differ
diff --git a/res/drawable-xhdpi/rectangle.png b/res/drawable-xhdpi/rectangle.png
new file mode 100644
index 0000000..138d25b
--- /dev/null
+++ b/res/drawable-xhdpi/rectangle.png
Binary files differ
diff --git a/res/drawable-xhdpi/round.png b/res/drawable-xhdpi/round.png
new file mode 100644
index 0000000..012a706
--- /dev/null
+++ b/res/drawable-xhdpi/round.png
Binary files differ
diff --git a/res/drawable-xhdpi/sketch.png b/res/drawable-xhdpi/sketch.png
new file mode 100644
index 0000000..357cb41
--- /dev/null
+++ b/res/drawable-xhdpi/sketch.png
Binary files differ
diff --git a/res/drawable-xhdpi/square.png b/res/drawable-xhdpi/square.png
new file mode 100644
index 0000000..d9d7946
--- /dev/null
+++ b/res/drawable-xhdpi/square.png
Binary files differ
diff --git a/res/drawable-xxhdpi/blur.png b/res/drawable-xxhdpi/blur.png
new file mode 100644
index 0000000..9cd27ee
--- /dev/null
+++ b/res/drawable-xxhdpi/blur.png
Binary files differ
diff --git a/res/drawable-xxhdpi/drawer_bg.png b/res/drawable-xxhdpi/drawer_bg.png
new file mode 100644
index 0000000..adc7e4a
--- /dev/null
+++ b/res/drawable-xxhdpi/drawer_bg.png
Binary files differ
diff --git a/res/drawable-xxhdpi/feather.png b/res/drawable-xxhdpi/feather.png
new file mode 100644
index 0000000..bb8069e
--- /dev/null
+++ b/res/drawable-xxhdpi/feather.png
Binary files differ
diff --git a/res/drawable-xxhdpi/focus.png b/res/drawable-xxhdpi/focus.png
new file mode 100644
index 0000000..8d58fd6
--- /dev/null
+++ b/res/drawable-xxhdpi/focus.png
Binary files differ
diff --git a/res/drawable-xxhdpi/fusion.png b/res/drawable-xxhdpi/fusion.png
new file mode 100644
index 0000000..1e88b9b
--- /dev/null
+++ b/res/drawable-xxhdpi/fusion.png
Binary files differ
diff --git a/res/drawable-xxhdpi/halo.png b/res/drawable-xxhdpi/halo.png
new file mode 100644
index 0000000..99ed56f
--- /dev/null
+++ b/res/drawable-xxhdpi/halo.png
Binary files differ
diff --git a/res/drawable-xxhdpi/multiselect.png b/res/drawable-xxhdpi/multiselect.png
new file mode 100644
index 0000000..6ec2985
--- /dev/null
+++ b/res/drawable-xxhdpi/multiselect.png
Binary files differ
diff --git a/res/drawable-xxhdpi/none.png b/res/drawable-xxhdpi/none.png
new file mode 100644
index 0000000..6e54e7d
--- /dev/null
+++ b/res/drawable-xxhdpi/none.png
Binary files differ
diff --git a/res/drawable-xxhdpi/play_detail.png b/res/drawable-xxhdpi/play_detail.png
new file mode 100644
index 0000000..01fc30f
--- /dev/null
+++ b/res/drawable-xxhdpi/play_detail.png
Binary files differ
diff --git a/res/drawable-xxhdpi/random.png b/res/drawable-xxhdpi/random.png
new file mode 100644
index 0000000..78140f7
--- /dev/null
+++ b/res/drawable-xxhdpi/random.png
Binary files differ
diff --git a/res/drawable-xxhdpi/rectangle.png b/res/drawable-xxhdpi/rectangle.png
new file mode 100644
index 0000000..ba45378
--- /dev/null
+++ b/res/drawable-xxhdpi/rectangle.png
Binary files differ
diff --git a/res/drawable-xxhdpi/round.png b/res/drawable-xxhdpi/round.png
new file mode 100644
index 0000000..3d9282f
--- /dev/null
+++ b/res/drawable-xxhdpi/round.png
Binary files differ
diff --git a/res/drawable-xxhdpi/sketch.png b/res/drawable-xxhdpi/sketch.png
new file mode 100644
index 0000000..be89c59
--- /dev/null
+++ b/res/drawable-xxhdpi/sketch.png
Binary files differ
diff --git a/res/drawable-xxhdpi/square.png b/res/drawable-xxhdpi/square.png
new file mode 100644
index 0000000..d339d8e
--- /dev/null
+++ b/res/drawable-xxhdpi/square.png
Binary files differ
diff --git a/res/drawable/addspot.xml b/res/drawable/addspot.xml
new file mode 100644
index 0000000..15bfee8
--- /dev/null
+++ b/res/drawable/addspot.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M19.316,16.303v-4.351h-1.66v4.351h-4.264v1.707h4.264v4.328h1.66V18.01h4.27v-1.707H19.316zM7.814,1.638c-4.087,0 -7.4,3.313 -7.4,7.401c0,4.088 3.313,7.4 7.4,7.4s7.4,-3.313 7.4,-7.4C15.215,4.952 11.901,1.638 7.814,1.638zM7.729,15.008c-3.353,0 -6.07,-2.718 -6.07,-6.071s2.718,-6.071 6.07,-6.071c3.354,0 6.071,2.718 6.071,6.071S11.083,15.008 7.729,15.008zM7.729,4.513c-2.47,0 -4.472,2.002 -4.472,4.472s2.002,4.472 4.472,4.472s4.472,-2.002 4.472,-4.472S10.199,4.513 7.729,4.513z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/adjust.xml b/res/drawable/adjust.xml
new file mode 100644
index 0000000..3ce4ed2
--- /dev/null
+++ b/res/drawable/adjust.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="12dp"
+ android:height="12dp"
+ android:viewportWidth="12.0"
+ android:viewportHeight="12.0">
+ <path
+ android:pathData="M5.984,6.016m-5.859,0a5.859,5.859 0,1 1,11.718 0a5.859,5.859 0,1 1,-11.718 0"
+ android:fillColor="#00E3FF"/>
+</vector>
diff --git a/res/drawable/albums.xml b/res/drawable/albums.xml
new file mode 100644
index 0000000..7d742d6
--- /dev/null
+++ b/res/drawable/albums.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M17.999,2h-12c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4C19.999,2.9 19.099,2 17.999,2zM5.999,4h5v8l-2.5,-1.5l-2.5,1.5V4zM5.999,19l3,-3.859l2.141,2.58l3,-3.861L17.999,19H5.999z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/back.xml b/res/drawable/back.xml
new file mode 100644
index 0000000..a8e282f
--- /dev/null
+++ b/res/drawable/back.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8l8,8l1.41,-1.41L7.83,13H20V11z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/beautify.xml b/res/drawable/beautify.xml
new file mode 100644
index 0000000..7ae64a3
--- /dev/null
+++ b/res/drawable/beautify.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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.0"
+ android:viewportHeight="32.0">
+ <path
+ android:pathData="M26.305,8.769c-0.433,0.9 -0.486,2.1 -0.486,2.1s-0.175,-1.205 -0.619,-2.128c-0.395,-0.822 -1.93,-1.111 -1.93,-1.111s1.492,-0.138 1.879,-0.938c0.451,-0.939 0.623,-2.139 0.623,-2.139s0.107,1.136 0.571,2.103c0.366,0.758 1.854,0.98 1.854,0.98S26.714,7.919 26.305,8.769zM24.283,18.035c0,0 0.081,-1.424 -0.418,-3.219c-1.354,-4.873 -3.568,-6.139 -3.568,-6.139s2.77,0.869 4.727,5.355C26.087,16.468 24.283,18.035 24.283,18.035zM23.139,17.76c0,0 0.488,1.772 -0.889,4.784c-1.379,3.017 -4.73,4.065 -4.73,4.065s2.842,-1.843 4.154,-4.443C22.706,20.119 23.139,17.76 23.139,17.76zM14.925,13.241c-2.487,1.971 -3.536,4.087 -3.536,7.08c0,3.931 5.176,7.127 5.176,7.127s-6.6,-2.607 -6.6,-7.426c0,-2.614 0.661,-5.133 1.835,-7.062c-0.72,0.654 -1.383,1.438 -1.868,2.416c-1.315,2.659 -0.804,6.175 -0.804,6.175c-2.54,-2.602 -3.533,-6.776 -2.229,-10.197c1.196,-3.136 3.49,-5.457 5.399,-6.058c3.968,-1.25 4.969,0.568 4.969,0.568s0.031,0.09 0.07,0.244c0.045,-0.37 -0.014,-0.573 -0.014,-0.573S21.336,8.16 14.925,13.241zM5.774,23.086c-0.294,0.622 -0.372,1.321 -0.372,1.321s-0.078,-0.701 -0.381,-1.34c-0.269,-0.566 -1.251,-0.704 -1.251,-0.704s0.954,-0.158 1.216,-0.711c0.307,-0.649 0.424,-1.481 0.424,-1.481s0.073,0.789 0.39,1.456C6.049,22.152 7,22.351 7,22.351S6.053,22.501 5.774,23.086zM24.859,22.814c0.478,-1.109 0.659,-2.631 0.659,-2.631s0.112,1.447 0.605,2.59c0.384,0.895 2.104,0.973 2.104,0.973s-1.716,0.152 -2.145,1.155c-0.459,1.063 -0.622,2.521 -0.622,2.521s-0.08,-1.464 -0.549,-2.553c-0.418,-0.972 -2.063,-1.146 -2.063,-1.146l-0.028,-0.004C22.822,23.72 24.451,23.762 24.859,22.814z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/camera.xml b/res/drawable/camera.xml
new file mode 100644
index 0000000..300b4a9
--- /dev/null
+++ b/res/drawable/camera.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0,0h24v24H0V0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M 12 9.799 C 13.7673111995 9.799 15.2 11.2316888005 15.2 12.999 C 15.2 14.7663111995 13.7673111995 16.199 12 16.199 C 10.2326888005 16.199 8.8 14.7663111995 8.8 12.999 C 8.8 11.2316888005 10.2326888005 9.799 12 9.799 Z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M9,3L7.17,5H4c-1.1,0-2,0.9-2,2v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7c0-1.1-0.9-2-2-2h-3.17L15,3H9z
+M12,18c-2.76,0-5-2.24-5-5c0-2.76,2.24-5,5-5s5,2.24,5,5C17,15.76,14.76,18,12,18z" />
+</vector>
\ No newline at end of file
diff --git a/res/drawable/cancel.xml b/res/drawable/cancel.xml
new file mode 100644
index 0000000..c3e5231
--- /dev/null
+++ b/res/drawable/cancel.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M19.205,6.41L17.795,5l-5.59,5.59L6.615,5l-1.41,1.41l5.59,5.59l-5.59,5.59L6.615,19l5.59,-5.59l5.59,5.59l1.41,-1.41L13.615,12L19.205,6.41z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/cancel2.xml b/res/drawable/cancel2.xml
new file mode 100644
index 0000000..4ccde0a
--- /dev/null
+++ b/res/drawable/cancel2.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M19.205,6.41L17.795,5l-5.59,5.59L6.615,5l-1.41,1.41l5.59,5.59l-5.59,5.59L6.615,19l5.59,-5.59l5.59,5.59l1.41,-1.41L13.615,12L19.205,6.41z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/color.xml b/res/drawable/color.xml
new file mode 100644
index 0000000..8a55308
--- /dev/null
+++ b/res/drawable/color.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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.0"
+ android:viewportHeight="32.0">
+ <path
+ android:pathData="M16,4.951C9.898,4.951 4.951,9.898 4.951,16c0,6.102 4.947,11.049 11.049,11.049c1.02,0 1.842,-0.822 1.842,-1.842c0,-0.479 -0.178,-0.908 -0.479,-1.232c-0.289,-0.326 -0.461,-0.75 -0.461,-1.223c0,-1.02 0.822,-1.842 1.842,-1.842h2.166c3.389,0 6.139,-2.75 6.139,-6.138C27.049,9.347 22.102,4.951 16,4.951zM9.248,16c-1.02,0 -1.842,-0.822 -1.842,-1.842c0,-1.019 0.822,-1.841 1.842,-1.841s1.842,0.822 1.842,1.841C11.09,15.178 10.268,16 9.248,16zM12.932,11.09c-1.02,0 -1.842,-0.822 -1.842,-1.842c0,-1.019 0.822,-1.842 1.842,-1.842c1.018,0 1.84,0.823 1.84,1.842C14.771,10.268 13.949,11.09 12.932,11.09zM19.068,11.09c-1.021,0 -1.842,-0.822 -1.842,-1.842c0,-1.019 0.821,-1.842 1.842,-1.842c1.02,0 1.842,0.823 1.842,1.842C20.91,10.268 20.088,11.09 19.068,11.09zM22.752,16c-1.02,0 -1.842,-0.822 -1.842,-1.842c0,-1.019 0.822,-1.841 1.842,-1.841s1.842,0.822 1.842,1.841C24.594,15.178 23.771,16 22.752,16z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/comparison_after.xml b/res/drawable/comparison_after.xml
new file mode 100644
index 0000000..972f69d
--- /dev/null
+++ b/res/drawable/comparison_after.xml
@@ -0,0 +1,42 @@
+<!--
+ Copyright (c) 2015, 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="36dp"
+ android:height="36dp"
+ android:viewportWidth="36.0"
+ android:viewportHeight="36.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,1c9.389,0 17,7.611 17,17c0,9.388 -7.611,17 -17,17C8.612,35 1,27.388 1,18C1,8.611 8.612,1 18,1z"
+ android:fillAlpha="0.26"/>
+ <path
+ android:pathData="M9.258,16h1.333v-1.333H9.258V16zM9.258,18.667h1.333v-1.334H9.258V18.667zM9.258,21.333h1.333V20H9.258V21.333zM10.591,23.999v-1.333H9.258C9.258,23.402 9.854,23.999 10.591,23.999zM9.258,13.334h1.333v-1.333C9.854,12.001 9.258,12.598 9.258,13.334zM17.334,25.332h1.333V10.667h-1.333V25.332zM14.667,23.999H16v-1.333h-1.333V23.999zM25.408,12.001h-5.37v1.333h5.37v9.332h-5.37v1.333h5.37c0.737,0 1.334,-0.597 1.334,-1.333v-9.332C26.742,12.598 26.146,12.001 25.408,12.001zM15.97,12.001h-1.333v1.333h1.333V12.001zM11.955,13.334h1.334v-1.333h-1.334V13.334zM11.955,23.999h1.334v-1.333h-1.334V23.999z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/comparison_before.xml b/res/drawable/comparison_before.xml
new file mode 100644
index 0000000..b846e03
--- /dev/null
+++ b/res/drawable/comparison_before.xml
@@ -0,0 +1,42 @@
+<!--
+ Copyright (c) 2015, 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="36dp"
+ android:height="36dp"
+ android:viewportWidth="36.0"
+ android:viewportHeight="36.0">
+ <path
+ android:pathData="M18,1c9.389,0 17,7.611 17,17c0,9.388 -7.611,17 -17,17C8.612,35 1,27.388 1,18C1,8.611 8.612,1 18,1z"
+ android:fillAlpha="0.26"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M9.258,16h1.333v-1.333H9.258V16zM10.591,23.999v-1.333H9.258C9.258,23.402 9.854,23.999 10.591,23.999zM9.258,13.334h1.333v-1.333C9.854,12.001 9.258,12.598 9.258,13.334zM9.258,21.333h1.333V20H9.258V21.333zM9.258,18.667h1.333v-1.334H9.258V18.667zM14.667,23.999H16v-1.333h-1.333V23.999zM25.408,12.001h-5.37v1.333h5.37v9.332h-5.37v1.333h5.37c0.737,0 1.334,-0.597 1.334,-1.333v-9.332C26.742,12.598 26.146,12.001 25.408,12.001zM17.334,25.332h1.333V10.667h-1.333V25.332zM15.97,12.001h-1.333v1.333h1.333V12.001zM11.955,13.334h1.334v-1.333h-1.334V13.334zM11.955,23.999h1.334v-1.333h-1.334V23.999z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/crop.xml b/res/drawable/crop.xml
new file mode 100644
index 0000000..9621a7d
--- /dev/null
+++ b/res/drawable/crop.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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.0"
+ android:viewportHeight="32.0">
+ <path
+ android:pathData="M20.911,19.324h2.28v-8.26c0,-1.127 -0.945,-2.438 -2.073,-2.438h-8.262v2.312h8.055V19.324zM11.117,21.008v-16.4H8.809v4.019h-4.02l-0.031,2.315l4.051,-0.004V21.27c0,1.127 0.914,2.041 2.041,2.041h10.03v4.082h2.312v-4.082h4.052v-2.303H11.117z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/delete.xml b/res/drawable/delete.xml
new file mode 100644
index 0000000..e3afef6
--- /dev/null
+++ b/res/drawable/delete.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M5.999,19.001c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2v-12h-12V19.001zM18.999,4.001h-3.5l-1,-1h-5l-1,1h-3.5v2h14V4.001z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/done.xml b/res/drawable/done.xml
new file mode 100644
index 0000000..bfd6316
--- /dev/null
+++ b/res/drawable/done.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M8.795,15.875l-4.17,-4.17l-1.42,1.41l5.59,5.59l12,-12l-1.41,-1.41L8.795,15.875z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/done2.xml b/res/drawable/done2.xml
new file mode 100644
index 0000000..198cbf3
--- /dev/null
+++ b/res/drawable/done2.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M8.795,15.875l-4.17,-4.17l-1.42,1.41l5.59,5.59l12,-12l-1.41,-1.41L8.795,15.875z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/drawer.xml b/res/drawable/drawer.xml
new file mode 100644
index 0000000..eaebbc4
--- /dev/null
+++ b/res/drawable/drawer.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M2.989,18h18.022v-2H2.989V18zM2.989,13h18.022v-2H2.989V13zM2.989,6v2h18.022V6H2.989z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/drawer_item_selected_bg.xml b/res/drawable/drawer_item_selected_bg.xml
new file mode 100644
index 0000000..81d6ce8
--- /dev/null
+++ b/res/drawable/drawer_item_selected_bg.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle" >
+ <solid android:color="#D8D8D8" >
+ </solid>
+
+</shape>
\ No newline at end of file
diff --git a/res/drawable/dualcamera.xml b/res/drawable/dualcamera.xml
new file mode 100644
index 0000000..7f05fa9
--- /dev/null
+++ b/res/drawable/dualcamera.xml
@@ -0,0 +1,21 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="32.0"
+ android:viewportHeight="32.0">
+ <path
+ android:pathData="M19.794,10.447H12.36c-1.152,0 -2.165,0.887 -2.165,2.04v7.912c0,1.153 1.012,2.086 2.165,2.086h7.434c1.154,0 2.011,-0.933 2.011,-2.086v-7.912C21.805,11.334 20.948,10.447 19.794,10.447zM19.865,20.57h-7.692v-8.175h7.692V20.57z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M21,7h4v5h2V7.713C27,6.341 26.156,5 24.783,5H21V7z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M7,12V7h4V5H7.399C6.027,5 5,6.341 5,7.713V12H7z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M11,26H7v-5H5v4.098C5,26.471 6.027,28 7.399,28H11V26z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M25,21v5h-4v2h3.783C26.156,28 27,26.471 27,25.098V21H25z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/edit.xml b/res/drawable/edit.xml
new file mode 100644
index 0000000..1501524
--- /dev/null
+++ b/res/drawable/edit.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M2.999,17.252v3.75h3.75l11.061,-11.06l-3.75,-3.75L2.999,17.252zM20.708,7.042c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.021,-0.39 -1.41,0l-1.83,1.83l3.75,3.75L20.708,7.042z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/exposure.xml b/res/drawable/exposure.xml
new file mode 100644
index 0000000..493e672
--- /dev/null
+++ b/res/drawable/exposure.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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.0"
+ android:viewportHeight="32.0">
+ <path
+ android:pathData="M19.514,21.201v2.357h1.644l0.045,-2.357h2.313v-1.688h-2.357V17.2h-1.643v2.313h-2.357v1.688H19.514zM24.85,4.793H7.061c-1.228,0 -2.223,0.995 -2.223,2.224v17.788c0,1.229 0.995,2.402 2.223,2.402H24.85c1.229,0 2.313,-1.174 2.313,-2.402V7.017C27.161,5.789 26.077,4.793 24.85,4.793zM8.173,8.173h6.671v2H8.173V8.173zM25.161,25.162h-18.1l18.1,-18.541V25.162z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/filtershow_menu_marker_rtl.xml b/res/drawable/filtershow_menu_marker_rtl.xml
index 1515004..a564985 100644
--- a/res/drawable/filtershow_menu_marker_rtl.xml
+++ b/res/drawable/filtershow_menu_marker_rtl.xml
@@ -1,4 +1,4 @@
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/filtershow_menu_marker"
+ android:src="@drawable/spinner_triangle"
android:autoMirrored="true">
</bitmap>
\ No newline at end of file
diff --git a/res/drawable/filtershow_slider.xml b/res/drawable/filtershow_slider.xml
index 23457a6..80805dc 100644
--- a/res/drawable/filtershow_slider.xml
+++ b/res/drawable/filtershow_slider.xml
@@ -16,13 +16,13 @@
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background"
- android:drawable="@drawable/filtershow_scrubber_track" />
+ android:drawable="@drawable/sliderbg" />
<item android:id="@android:id/secondaryProgress">
<scale android:scaleWidth="100%"
- android:drawable="@drawable/filtershow_scrubber_secondary" />
+ android:drawable="@drawable/sliderprogress" />
</item>
<item android:id="@android:id/progress">
<scale android:scaleWidth="100%"
- android:drawable="@drawable/filtershow_scrubber_primary" />
+ android:drawable="@drawable/sliderprogress" />
</item>
</layer-list>
\ No newline at end of file
diff --git a/res/drawable/frames.xml b/res/drawable/frames.xml
new file mode 100644
index 0000000..b26f282
--- /dev/null
+++ b/res/drawable/frames.xml
@@ -0,0 +1,44 @@
+<!--
+ Copyright (c) 2015, 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.0"
+ android:viewportHeight="32.0">
+ <path
+ android:pathData="M24.934,8.228h-4.467L16,3.761l-4.468,4.467H7.065c-1.234,0 -2.233,1 -2.233,2.233v15.441c0,1.232 0.999,2.338 2.233,2.338h17.869c1.233,0 2.233,-1.104 2.233,-2.338V10.461C27.168,9.228 26.168,8.228 24.934,8.228zM25.178,26.25H6.822V10.252h5.285l3.932,-3.699l3.886,3.699h5.253V26.25z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M23.143,12.216"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="M8.923,12.216h14.153v11.966h-14.153z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/more.xml b/res/drawable/more.xml
new file mode 100644
index 0000000..ae6b4ea
--- /dev/null
+++ b/res/drawable/more.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2c-1.1,0 -2,0.9 -2,2S10.9,8 12,8zM12,10c-1.1,0 -2,0.9 -2,2c0,1.1 0.9,2 2,2c1.1,0 2,-0.9 2,-2C14,10.9 13.1,10 12,10zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,16 12,16z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/more2.xml b/res/drawable/more2.xml
new file mode 100644
index 0000000..5f3c988
--- /dev/null
+++ b/res/drawable/more2.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="36dp"
+ android:height="36dp"
+ android:viewportWidth="36.0"
+ android:viewportHeight="36.0">
+ <path
+ android:pathData="M18,13c1.381,0 2.5,-1.119 2.5,-2.5S19.381,8 18,8s-2.5,1.119 -2.5,2.5S16.619,13 18,13zM18,15.5c-1.381,0 -2.5,1.119 -2.5,2.5s1.119,2.5 2.5,2.5s2.5,-1.119 2.5,-2.5S19.381,15.5 18,15.5zM18,23c-1.381,0 -2.5,1.119 -2.5,2.5S16.619,28 18,28s2.5,-1.119 2.5,-2.5S19.381,23 18,23z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/multiselect.xml b/res/drawable/multiselect.xml
new file mode 100644
index 0000000..9b21370
--- /dev/null
+++ b/res/drawable/multiselect.xml
@@ -0,0 +1,41 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10c5.52,0 10,-4.48 10,-10C22,6.48 17.52,2 12,2z"
+ android:fillColor="#2196F3"/>
+ <path
+ android:pathData="M10,17l-5,-5l1.4099998,-1.4099998l3.5900002,3.58l7.59,-7.59l1.4099998,1.4200001z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/multiselect_delete.xml b/res/drawable/multiselect_delete.xml
new file mode 100644
index 0000000..aade6c2
--- /dev/null
+++ b/res/drawable/multiselect_delete.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6V19zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/multiselect_more.xml b/res/drawable/multiselect_more.xml
new file mode 100644
index 0000000..a0f6e7d
--- /dev/null
+++ b/res/drawable/multiselect_more.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2c-1.1,0 -2,0.9 -2,2S10.9,8 12,8zM12,10c-1.1,0 -2,0.9 -2,2c0,1.1 0.9,2 2,2c1.1,0 2,-0.9 2,-2C14,10.9 13.1,10 12,10zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2c1.1,0 2,-0.9 2,-2S13.1,16 12,16z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/multiselect_share.xml b/res/drawable/multiselect_share.xml
new file mode 100644
index 0000000..1cf7418
--- /dev/null
+++ b/res/drawable/multiselect_share.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,16.12c-0.76,0 -1.439,0.3 -1.96,0.77L8.91,12.74C8.96,12.51 9,12.28 9,12.04s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81c1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3s-3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.85C7.5,9.35 6.79,9.04 6,9.04c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.311 2.04,-0.811l7.12,4.16c-0.051,0.211 -0.08,0.43 -0.08,0.65c0,1.609 1.311,2.92 2.92,2.92s2.92,-1.311 2.92,-2.92S19.609,16.12 18,16.12z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/multiselected_back.xml b/res/drawable/multiselected_back.xml
new file mode 100644
index 0000000..dcd03f5
--- /dev/null
+++ b/res/drawable/multiselected_back.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8l8,8l1.41,-1.41L7.83,13H20V11z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/overflow.xml b/res/drawable/overflow.xml
new file mode 100644
index 0000000..b507ea4
--- /dev/null
+++ b/res/drawable/overflow.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0,0h24v24H0V0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z
+M12,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2 c1.1,0,2-0.9,2-2C14,10.9,13.1,10,12,10z
+M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z" />
+</vector>
\ No newline at end of file
diff --git a/res/drawable/selected.xml b/res/drawable/selected.xml
new file mode 100644
index 0000000..f55e66d
--- /dev/null
+++ b/res/drawable/selected.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="37dp"
+ android:height="37dp"
+ android:viewportWidth="37.0"
+ android:viewportHeight="37.0">
+ <path
+ android:pathData="M36,1v35H1V1H36M37,0H0v37h37V0L37,0z"
+ android:fillColor="#40C4FF"/>
+</vector>
diff --git a/res/drawable/share.xml b/res/drawable/share.xml
new file mode 100644
index 0000000..bd05d15
--- /dev/null
+++ b/res/drawable/share.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M17.999,16.121c-0.76,0 -1.439,0.3 -1.96,0.77L8.91,12.741C8.959,12.512 9,12.281 9,12.041s-0.04,-0.471 -0.09,-0.7l7.049,-4.11c0.54,0.5 1.25,0.81 2.04,0.81c1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3s-3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.851C7.5,9.351 6.79,9.041 6,9.041c-1.66,0 -3,1.34 -3,3c0,1.661 1.34,3 3,3c0.79,0 1.5,-0.311 2.04,-0.811l7.12,4.16c-0.051,0.211 -0.08,0.43 -0.08,0.65c0,1.609 1.311,2.92 2.92,2.92s2.92,-1.311 2.92,-2.92S19.608,16.121 17.999,16.121z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/sliderbg.xml b/res/drawable/sliderbg.xml
new file mode 100644
index 0000000..974ab91
--- /dev/null
+++ b/res/drawable/sliderbg.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="216dp"
+ android:height="4dp"
+ android:viewportWidth="216.0"
+ android:viewportHeight="4.0">
+ <path
+ android:pathData="M0,1h216v2h-216z"
+ android:fillAlpha="0.2"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/sliderprogress.xml b/res/drawable/sliderprogress.xml
new file mode 100644
index 0000000..9ca10b6
--- /dev/null
+++ b/res/drawable/sliderprogress.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="216dp"
+ android:height="4dp"
+ android:viewportWidth="216.0"
+ android:viewportHeight="4.0">
+ <path
+ android:pathData="M0,1h216v2h-216z"
+ android:fillColor="#00E3FF"/>
+</vector>
diff --git a/res/drawable/slideshow.xml b/res/drawable/slideshow.xml
new file mode 100644
index 0000000..1b044bb
--- /dev/null
+++ b/res/drawable/slideshow.xml
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M10,8v8l5,-4L10,8zM19,3H5C3.9,3 3,3.9 3,5v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5C21,3.9 20.1,3 19,3zM19,19H5V5h14V19z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/res/drawable/spinner_triangle.xml b/res/drawable/spinner_triangle.xml
new file mode 100644
index 0000000..a2f3141
--- /dev/null
+++ b/res/drawable/spinner_triangle.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015, 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 android:autoMirrored="true" android:height="12dp"
+ android:viewportHeight="12.0" android:viewportWidth="12.0"
+ android:width="12dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillAlpha="0.3" android:fillColor="#FFFFFF" android:pathData="M12,3.7V12H3.7L12,3.7z"/>
+</vector>
diff --git a/res/drawable/timeline.xml b/res/drawable/timeline.xml
new file mode 100644
index 0000000..d5ba75b
--- /dev/null
+++ b/res/drawable/timeline.xml
@@ -0,0 +1,43 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M19.057,4.034h-1.01V2.059h-2.016v1.976H7.969V2.059H5.951v1.976H4.902c-1.115,0 -1.967,0.943 -1.967,2.058l-0.01,13.832c0,1.114 0.902,2.017 2.016,2.017h14.115c1.113,0 2.016,-0.902 2.016,-2.017V6.092C21.072,4.978 20.17,4.034 19.057,4.034zM19.098,19.965H4.941V9.015h14.156V19.965z"
+ android:fillAlpha="0.54"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M6.184,16.241l3.738,-4.984l2.908,3.742l2.076,-2.496l2.907,3.738H6.184z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/drawable/videos.xml b/res/drawable/videos.xml
new file mode 100644
index 0000000..00f09d5
--- /dev/null
+++ b/res/drawable/videos.xml
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2015, 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="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M3.999,6h-2v14c0,1.1 0.9,2 2,2h14v-2h-14V6zM19.999,2h-12c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4C21.999,2.9 21.099,2 19.999,2zM11.999,14.5v-9l6,4.5L11.999,14.5z"
+ android:fillAlpha="0.54"/>
+</vector>
diff --git a/res/layout-land/filtershow_activity.xml b/res/layout-land/filtershow_activity.xml
index f438012..35914a4 100644
--- a/res/layout-land/filtershow_activity.xml
+++ b/res/layout-land/filtershow_activity.xml
@@ -16,99 +16,85 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/mainView"
- android:background="@drawable/filtershow_tiled_background">
+ android:id="@+id/mainView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- android:animateLayoutChanges="true">
-
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:animateLayoutChanges="true"
+ android:orientation="horizontal" >
<FrameLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1">
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1" >
<ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.Holo.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:background="@null"/>
+ android:id="@+id/loading"
+ style="@android:style/Widget.Holo.ProgressBar.Large"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:background="@null"
+ android:indeterminate="true"
+ android:indeterminateOnly="true" />
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical"
- >
-
- <LinearLayout
- android:layout_weight="1"
- android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:orientation="horizontal">
-
- <FrameLayout
- android:id="@+id/central_panel_container"
- android:layout_gravity="center"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:visibility="gone"/>
-
- <FrameLayout
- android:id="@+id/editorContainer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- <com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
-
- </LinearLayout>
+ <RelativeLayout
+ android:id="@+id/imageContainer"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="horizontal" >
<FrameLayout
- android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible"/>
+ android:id="@+id/editorContainer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:visibility="gone" />
- </LinearLayout>
+ <com.android.gallery3d.filtershow.imageshow.ImageShow
+ android:id="@+id/imageShow"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" />
- </FrameLayout>
+ <ImageButton
+ android:id="@+id/imgComparison"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_marginRight="16dp"
+ android:layout_marginTop="100dp"
+ android:background="@android:color/transparent"
+ android:src="@drawable/comparison_before"
+ android:visibility="visible" />
+ </RelativeLayout>
- <LinearLayout
+ <LinearLayout
android:id="@+id/mainPanel"
- android:layout_width="350dip"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:animateLayoutChanges="true">
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:layout_gravity="center|bottom"
+ android:animateLayoutChanges="true"
+ android:orientation="vertical" >
- <FrameLayout
+ <FrameLayout
android:id="@+id/main_panel_container"
- android:layout_width="350dip"
+ android:layout_width="match_parent"
android:layout_height="0dip"
- android:layout_weight="1"/>
-
- </LinearLayout>
-
+ android:layout_gravity="center"
+ android:layout_weight="1" />
+ </LinearLayout>
+ </FrameLayout>
</LinearLayout>
<com.android.gallery3d.filtershow.category.CategorySelected
- android:layout_width="@dimen/category_panel_icon_size"
- android:layout_height="@dimen/category_panel_icon_size"
- android:id="@+id/categorySelectedIndicator"
- android:visibility="invisible"/>
+ android:id="@+id/categorySelectedIndicator"
+ android:layout_width="@dimen/category_panel_icon_size"
+ android:layout_height="@dimen/category_panel_icon_size"
+ android:visibility="gone" />
-</FrameLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout-land/filtershow_category_panel_new.xml b/res/layout-land/filtershow_category_panel_new.xml
index ad85f71..26b92e7 100644
--- a/res/layout-land/filtershow_category_panel_new.xml
+++ b/res/layout-land/filtershow_category_panel_new.xml
@@ -16,24 +16,48 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/edit_actionbar_background"
+ android:orientation="horizontal" >
- <com.android.gallery3d.filtershow.category.IconView
- android:id="@+id/addButton"
+ <!-- <com.android.gallery3d.filtershow.category.IconView -->
+ <!-- android:id="@+id/addButton" -->
+ <!-- android:layout_width="match_parent" -->
+ <!-- android:layout_height="@dimen/category_panel_height" -->
+ <!-- android:src="@drawable/filtershow_add"/> -->
+
+
+ <!-- <ListView -->
+ <!-- android:id="@+id/listItems" -->
+ <!-- android:orientation="vertical" -->
+ <!-- android:layout_width="match_parent" -->
+ <!-- android:layout_height="@dimen/category_panel_height" -->
+ <!-- android:layout_margin="8dip" -->
+ <!-- android:divider="@android:color/transparent" -->
+ <!-- android:dividerHeight="8dip" -->
+ <!-- android:layout_weight="1"/> -->
+
+ <HorizontalScrollView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:scrollbars="none" >
+
+ <com.android.gallery3d.filtershow.category.CategoryTrack
+ android:id="@+id/listItems"
android:layout_width="match_parent"
android:layout_height="@dimen/category_panel_height"
- android:src="@drawable/filtershow_add"/>
-
- <ListView
- android:id="@+id/listItems"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_margin="8dip"
android:divider="@android:color/transparent"
- android:dividerHeight="8dip"
- android:layout_weight="1"/>
+ android:dividerPadding="8dip"
+ custom:iconSize="@dimen/category_panel_icon_size" />
+ </HorizontalScrollView>
+
+ <com.android.gallery3d.filtershow.category.IconView
+ android:id="@+id/addButton"
+ android:layout_width="@dimen/category_panel_height"
+ android:layout_height="@dimen/category_panel_height"
+ android:src="@drawable/filtershow_add" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-land/filtershow_editor_panel.xml b/res/layout-land/filtershow_editor_panel.xml
index f51dc14..59885e0 100644
--- a/res/layout-land/filtershow_editor_panel.xml
+++ b/res/layout-land/filtershow_editor_panel.xml
@@ -16,124 +16,97 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/top"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:visibility="visible">
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="visible" >
- <RelativeLayout
+ <!-- <RelativeLayout -->
+ <!-- android:layout_width="match_parent" -->
+ <!-- android:layout_height="match_parent" > -->
+
+ <Button
+ android:id="@+id/toggle_state"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:background="@color/background_main_toolbar"
+ android:text="@string/imageState"
+ android:visibility="gone" />
+
+ <!-- <LinearLayout -->
+ <!-- android:id="@+id/applyBar" -->
+ <!-- android:layout_width="match_parent" -->
+ <!-- android:layout_height="48dip" -->
+ <!-- android:layout_above="@id/bottomControlLineBottom" -->
+ <!-- android:background="@color/background_main_toolbar" -->
+ <!-- android:baselineAligned="false" -->
+ <!-- android:orientation="horizontal" -->
+ <!-- android:visibility="visible" > -->
+
+
+ <!-- <ImageButton -->
+ <!-- android:id="@+id/cancelFilter" -->
+ <!-- android:layout_width="wrap_content" -->
+ <!-- android:layout_height="fill_parent" -->
+ <!-- android:layout_gravity="left|center_vertical" -->
+ <!-- android:layout_weight=".1" -->
+ <!-- android:background="@android:color/transparent" -->
+ <!-- android:gravity="center" -->
+ <!-- android:src="@drawable/ic_menu_cancel_holo_light" -->
+ <!-- android:textSize="18dip" /> -->
+
+
+ <!-- <LinearLayout -->
+ <!-- android:id="@+id/panelAccessoryViewList" -->
+ <!-- android:layout_width="wrap_content" -->
+ <!-- android:layout_height="match_parent" -->
+ <!-- android:layout_weight="1" -->
+ <!-- android:orientation="horizontal" -->
+ <!-- android:visibility="visible" > -->
+
+
+ <!-- <com.android.gallery3d.filtershow.editors.SwapButton -->
+ <!-- android:id="@+id/applyEffect" -->
+ <!-- android:layout_width="fill_parent" -->
+ <!-- android:layout_height="fill_parent" -->
+ <!-- android:layout_gravity="center" -->
+ <!-- android:background="@android:color/transparent" -->
+ <!-- android:drawableEnd="@drawable/filtershow_menu_marker_rtl" -->
+ <!-- android:text="@string/apply_effect" -->
+ <!-- android:textSize="18dip" /> -->
+ <!-- </LinearLayout> -->
+
+
+ <!-- <ImageButton -->
+ <!-- android:id="@+id/applyFilter" -->
+ <!-- android:layout_width="wrap_content" -->
+ <!-- android:layout_height="fill_parent" -->
+ <!-- android:layout_gravity="right|center_vertical" -->
+ <!-- android:layout_weight=".1" -->
+ <!-- android:background="@android:color/transparent" -->
+ <!-- android:gravity="center" -->
+ <!-- android:src="@drawable/ic_menu_done_holo_light" -->
+ <!-- android:textSize="18dip" /> -->
+ <!-- </LinearLayout> -->
+
+ <LinearLayout
+ android:id="@+id/controlArea"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="bottom"
+ android:orientation="horizontal"
+ android:visibility="visible" >
+
+ <SeekBar
+ android:id="@+id/primarySeekBar"
+ style="@style/FilterShowSlider"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- >
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:visibility="gone" />
+ </LinearLayout>
+ <!-- </RelativeLayout> -->
- <Button
- android:id="@+id/toggle_state"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/imageState"
- android:background="@color/background_main_toolbar"
- android:layout_alignParentTop="true"
- />
-
- <View
- android:id="@+id/bottomControlLineBottom"
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"
- android:layout_alignParentBottom="true"
- />
- <LinearLayout
- android:id="@+id/applyBar"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:background="@color/background_main_toolbar"
- android:orientation="horizontal"
- android:baselineAligned="false"
- android:visibility="visible"
- android:layout_above="@id/bottomControlLineBottom"
- >
-
- <ImageButton
- android:id="@+id/cancelFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left|center_vertical"
- android:background="@android:color/transparent"
- android:layout_weight=".1"
- android:gravity="center"
- android:src="@drawable/ic_menu_cancel_holo_light"
- android:textSize="18dip"/>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <LinearLayout
- android:id="@+id/panelAccessoryViewList"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:visibility="visible">
-
- <com.android.gallery3d.filtershow.editors.SwapButton
- android:id="@+id/applyEffect"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center"
- android:background="@android:color/transparent"
- android:text="@string/apply_effect"
- android:textSize="18dip"
- android:drawableEnd="@drawable/filtershow_menu_marker_rtl"
- android:textAllCaps="true"/>
-
- </LinearLayout>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <ImageButton
- android:id="@+id/applyFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:layout_weight=".1"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:src="@drawable/ic_menu_done_holo_light"
- android:textSize="18dip"/>
- </LinearLayout>
- <View
- android:id="@+id/bottomControlLineTop"
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"
- android:layout_above="@id/applyBar"
- />
-
- <LinearLayout
- android:id="@+id/controlArea"
- android:layout_width="match_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:layout_above="@id/bottomControlLineTop"
- android:layout_below="@id/toggle_state"
- android:gravity="bottom"
- android:visibility="visible">
-
- <SeekBar
- android:id="@+id/primarySeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- style="@style/FilterShowSlider"
- android:visibility="gone"/>
-
- </LinearLayout>
-
- </RelativeLayout>
-</LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-land/filtershow_grad_ui.xml b/res/layout-land/filtershow_grad_ui.xml
index 71aa22a..7cc874c 100644
--- a/res/layout-land/filtershow_grad_ui.xml
+++ b/res/layout-land/filtershow_grad_ui.xml
@@ -118,7 +118,7 @@
android:scaleType="centerInside"
android:layout_weight="0"
android:background="@drawable/filtershow_button_background"
- android:src="@drawable/filtershow_addpoint"
+ android:src="@drawable/addspot"
android:paddingBottom="8dp"
android:layout_marginStart="48dp" />
@@ -136,7 +136,7 @@
android:scaleType="centerInside"
android:layout_weight="0"
android:background="@drawable/filtershow_button_background"
- android:src="@drawable/ic_menu_trash_holo_light"
+ android:src="@drawable/delete"
android:paddingBottom="8dp"
android:layout_marginEnd="48dp" />
diff --git a/res/layout-land/filtershow_main_panel.xml b/res/layout-land/filtershow_main_panel.xml
index 2202f10..2d20df1 100644
--- a/res/layout-land/filtershow_main_panel.xml
+++ b/res/layout-land/filtershow_main_panel.xml
@@ -16,100 +16,165 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:baselineAligned="false"
- android:orientation="vertical"
- android:animateLayoutChanges="true"
- android:visibility="visible" >
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:animateLayoutChanges="true"
+ android:baselineAligned="false"
+ android:orientation="vertical"
+ android:visibility="visible" >
- <FrameLayout android:id="@+id/category_panel_container"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"/>
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
<com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center|bottom"
+ android:orientation="vertical"
+ android:background="@color/edit_actionbar_background"
+ custom:max_width="400dip" >
+
+ <FrameLayout
+ android:id="@+id/category_panel_container"
android:layout_width="match_parent"
- android:layout_height="48dip"
- android:layout_gravity="center|bottom"
- custom:max_width="400dip"
- android:orientation="vertical">
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:visibility="gone" />
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@color/background_main_toolbar">
+ <LinearLayout
+ android:id="@+id/effectsContainer"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="10dp" >
<ImageButton
- android:id="@+id/fxButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_effects"/>
+ android:id="@+id/fxButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:scaleType="centerInside"
+ android:src="@drawable/color" />
<ImageButton
- android:id="@+id/borderButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_border"/>
+ android:id="@+id/borderButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/frames" />
<ImageButton
- android:id="@+id/geometryButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_fix"/>
+ android:id="@+id/geometryButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/crop" />
<ImageButton
- android:id="@+id/colorsButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_color"/>
+ android:id="@+id/colorsButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/exposure" />
+
<ImageButton
- android:id="@+id/makeupButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:visibility="gone"
- android:src="@drawable/ic_photoeditor_makeup"/>
+ android:id="@+id/makeupButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/beautify"
+ android:visibility="gone" />
<ImageButton
android:id="@+id/dualCamButton"
android:layout_width="@dimen/thumbnail_size"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
+ android:background="@android:color/transparent"
android:padding="2dip"
android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_dualcam"/>
-
+ android:src="@drawable/dualcamera"/>
</LinearLayout>
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
+ <LinearLayout
+ android:id="@+id/effectsText"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingTop="5dp" >
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
+ <TextView
+ android:id="@+id/tvColor"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:text="@string/color"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvFrames"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:text="@string/frames"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvCrop"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:paddingLeft="12dp"
+ android:text="@string/crop"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvExposure"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:text="@string/exposure"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvBeautify"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:text="@string/beautify"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/tvDualCam"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/dualcam"
+ android:gravity="center"
+ android:textColor="#ffffff"
+ android:textSize="@dimen/edit_main_font"
+ android:visibility="gone" />
+ </LinearLayout>
+ </com.android.gallery3d.filtershow.CenteredLinearLayout>
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/action_mode.xml b/res/layout/action_mode.xml
index c3a5a77..a8f5fc2 100644
--- a/res/layout/action_mode.xml
+++ b/res/layout/action_mode.xml
@@ -32,7 +32,8 @@
style="?android:attr/actionButtonStyle"
android:divider="?android:attr/listDividerAlertDialog"
android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
- android:textColor="?android:attr/actionMenuTextColor"
+ android:textColor="#8A000000"
+ android:textSize="20sp"
android:singleLine="true"
android:gravity="left|center_vertical"
android:paddingEnd="25dip"
diff --git a/res/layout/details.xml b/res/layout/details.xml
index 1fea0a0..0c3622b 100644
--- a/res/layout/details.xml
+++ b/res/layout/details.xml
@@ -18,6 +18,7 @@
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="16sp"
+ android:textColor="@color/albumset_label_background"
android:gravity="start"
/>
diff --git a/res/layout/details_list.xml b/res/layout/details_list.xml
index b80ab6c..aa5842c 100644
--- a/res/layout/details_list.xml
+++ b/res/layout/details_list.xml
@@ -17,6 +17,9 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="16dp"
+ android:paddingTop="20dp"
+ android:paddingBottom="16dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
android:dividerHeight="8dp"
/>
diff --git a/res/layout/drawer_list_item.xml b/res/layout/drawer_list_item.xml
new file mode 100644
index 0000000..aee1983
--- /dev/null
+++ b/res/layout/drawer_list_item.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="48dp"
+ android:paddingTop="10dp"
+ android:paddingBottom="10dp">
+
+ <ImageView
+ android:id="@+id/ivItem"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_marginStart="16dp"
+ />
+
+ <TextView
+ android:id="@+id/itemTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="12sp"
+ android:layout_centerVertical="true"
+ android:fontFamily="sans-serif-medium"
+ android:textColor="#000000"
+ android:alpha="0.87"
+ android:layout_marginStart="64dp"
+ />
+</RelativeLayout>
diff --git a/res/layout/filtershow_actionbar.xml b/res/layout/filtershow_actionbar.xml
index 2b77dfc..f31587c 100644
--- a/res/layout/filtershow_actionbar.xml
+++ b/res/layout/filtershow_actionbar.xml
@@ -14,14 +14,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@drawable/filtershow_button_background"
- android:id="@+id/filtershow_done"
- android:textAllCaps="true"
- android:text="@string/save"
- android:gravity="center_vertical"
- android:textSize="14sp"
- android:drawableStart="@drawable/menu_save_photo"
- android:drawablePadding="8dip" />
\ No newline at end of file
+ android:layout_height="@dimen/toolbar_height" >
+
+ <TextView
+ android:id="@+id/filtershow_done"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:drawablePadding="24dp"
+ android:drawableStart="@drawable/done"
+ android:gravity="center_vertical"
+ android:paddingBottom="20dp"
+ android:text="@string/save"
+ android:textColor="#ffffff"
+ android:textSize="20sp" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/filtershow_actionbar_new.xml b/res/layout/filtershow_actionbar_new.xml
new file mode 100644
index 0000000..1e56b8d
--- /dev/null
+++ b/res/layout/filtershow_actionbar_new.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/toolbar_height"
+ android:paddingTop="15dp">
+
+ <ImageButton
+ android:id="@+id/imgCancel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:background="@android:color/transparent"
+ android:src="@drawable/cancel"
+ android:paddingLeft="16dp"/>
+
+ <ImageButton
+ android:id="@+id/imgDone"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:background="@android:color/transparent"
+ android:src="@drawable/done"
+ android:paddingRight="16dp" />
+
+</RelativeLayout>
\ No newline at end of file
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml
index 79c315b..1340bc4 100644
--- a/res/layout/filtershow_activity.xml
+++ b/res/layout/filtershow_activity.xml
@@ -16,85 +16,86 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/mainView"
- android:background="@drawable/filtershow_tiled_background">
+ android:id="@+id/mainView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#212121" >
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
<FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1">
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" >
<ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.Holo.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:background="@null"/>
+ android:id="@+id/loading"
+ style="@android:style/Widget.Holo.ProgressBar.Large"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:background="@null"
+ android:indeterminate="true"
+ android:indeterminateOnly="true" />
- <LinearLayout
- android:layout_weight="1"
+ <RelativeLayout
+ android:id="@+id/imageContainer"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="horizontal" >
+
+ <FrameLayout
+ android:id="@+id/editorContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <FrameLayout
- android:id="@+id/central_panel_container"
- android:layout_gravity="center"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:visibility="gone"/>
-
- <FrameLayout
- android:id="@+id/editorContainer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
+ android:layout_weight="1"
+ android:visibility="gone" />
<com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"/>
+ android:id="@+id/imageShow"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_weight="1" />
+ <ImageButton
+ android:id="@+id/imgComparison"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_marginRight="10dp"
+ android:layout_marginTop="104dp"
+ android:background="@android:color/transparent"
+ android:src="@drawable/comparison_before"
+ android:visibility="visible" />
+ </RelativeLayout>
- </LinearLayout>
-
- </FrameLayout>
-
- <com.android.gallery3d.filtershow.CenteredLinearLayout
+ <com.android.gallery3d.filtershow.CenteredLinearLayout
xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
android:id="@+id/mainPanel"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="80dp"
android:layout_gravity="center|bottom"
- custom:max_width="650dip"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ custom:max_width="650dip" >
- <FrameLayout android:id="@+id/main_panel_container"
- android:layout_gravity="center"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1" />
-
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
-
+ <FrameLayout
+ android:id="@+id/main_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_gravity="center"
+ android:layout_weight="1" />
+ </com.android.gallery3d.filtershow.CenteredLinearLayout>
+ </FrameLayout>
</LinearLayout>
<com.android.gallery3d.filtershow.category.CategorySelected
- android:layout_width="@dimen/category_panel_icon_size"
- android:layout_height="@dimen/category_panel_icon_size"
- android:id="@+id/categorySelectedIndicator"
- android:visibility="invisible"/>
+ android:id="@+id/categorySelectedIndicator"
+ android:layout_width="@dimen/category_panel_icon_size"
+ android:layout_height="@dimen/category_panel_icon_size"
+ android:visibility="gone" />
-</FrameLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/filtershow_category_panel.xml b/res/layout/filtershow_category_panel.xml
index c1b8bbe..74ead63 100644
--- a/res/layout/filtershow_category_panel.xml
+++ b/res/layout/filtershow_category_panel.xml
@@ -17,8 +17,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="48dip"
- android:background="@color/background_main_toolbar" >
+ android:layout_height="80dp"
+ android:background="@color/edit_actionbar_background" >
<ImageButton
android:id="@+id/fxButton"
diff --git a/res/layout/filtershow_category_panel_new.xml b/res/layout/filtershow_category_panel_new.xml
index 8073f68..51439f0 100644
--- a/res/layout/filtershow_category_panel_new.xml
+++ b/res/layout/filtershow_category_panel_new.xml
@@ -20,7 +20,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/filtershow_categoryview_background">
+ android:background="@color/edit_actionbar_background">
<HorizontalScrollView
android:layout_width="0dp"
diff --git a/res/layout/filtershow_color_picker.xml b/res/layout/filtershow_color_picker.xml
index 7b05765..482c463 100644
--- a/res/layout/filtershow_color_picker.xml
+++ b/res/layout/filtershow_color_picker.xml
@@ -17,14 +17,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_main_toolbar">
+ android:background="@color/albumset_background">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_main_toolbar">
+ android:background="@color/albumset_background">
<com.android.gallery3d.filtershow.colorpicker.ColorCompareView
android:id="@+id/btnSelect"
@@ -66,7 +66,7 @@
android:background="@android:color/transparent"
android:layout_weight=".1"
android:gravity="center"
- android:src="@drawable/ic_menu_cancel_holo_light"
+ android:src="@drawable/cancel2"
android:textSize="18dip"/>
<ImageView
@@ -81,7 +81,7 @@
android:layout_weight=".1"
android:background="@android:color/transparent"
android:gravity="center"
- android:src="@drawable/ic_menu_done_holo_light"
+ android:src="@drawable/done2"
android:textSize="18dip"/>
</LinearLayout>
</LinearLayout>
diff --git a/res/layout/filtershow_control_action_slider.xml b/res/layout/filtershow_control_action_slider.xml
index 34eac1e..01d5e12 100644
--- a/res/layout/filtershow_control_action_slider.xml
+++ b/res/layout/filtershow_control_action_slider.xml
@@ -19,7 +19,8 @@
xmlns:app="http://schemas.android.com/apk/res/com.example.imagefilterharness"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:gravity="center" >
<ImageButton
android:id="@+id/leftActionButton"
@@ -29,8 +30,9 @@
android:scaleType="centerInside"
android:layout_weight="0"
android:background="@drawable/filtershow_button_background"
- android:src="@drawable/filtershow_addpoint"
- android:paddingBottom="8dp" />
+ android:src="@drawable/addspot"
+ android:paddingBottom="8dp"
+ android:paddingStart="14dp" />
<SeekBar
android:id="@+id/controlValueSeekBar"
@@ -48,8 +50,9 @@
android:scaleType="centerInside"
android:layout_weight="0"
android:background="@drawable/filtershow_button_background"
- android:src="@drawable/ic_menu_trash_holo_light"
- android:paddingBottom="8dp" />
+ android:src="@drawable/delete"
+ android:paddingBottom="8dp"
+ android:paddingEnd="14dp" />
</LinearLayout>
diff --git a/res/layout/filtershow_control_color_chooser.xml b/res/layout/filtershow_control_color_chooser.xml
index 145041c..18ac83d 100644
--- a/res/layout/filtershow_control_color_chooser.xml
+++ b/res/layout/filtershow_control_color_chooser.xml
@@ -19,68 +19,64 @@
xmlns:app="http://schemas.android.com/apk/res/com.example.imagefilterharness"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|center_horizontal"
android:orientation="horizontal" >
+
<LinearLayout
- android:id="@+id/listColors"
- android:layout_weight="5"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
+ android:id="@+id/listColors"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dp"
+ android:orientation="horizontal" >
<Button
- android:id="@+id/draw_color_button01"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:background="@drawable/filtershow_color_picker_circle"
- android:layout_marginEnd="4dp"/>
+ android:id="@+id/draw_color_button01"
+ android:layout_width="@dimen/color_button_width"
+ android:layout_height="@dimen/color_button_height"
+ android:layout_marginEnd="22dp"
+ android:background="@drawable/filtershow_color_picker_circle" />
<Button
- android:id="@+id/draw_color_button02"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:background="@drawable/filtershow_color_picker_circle"
- android:layout_marginEnd="4dp"/>
+ android:id="@+id/draw_color_button02"
+ android:layout_width="@dimen/color_button_width"
+ android:layout_height="@dimen/color_button_height"
+ android:layout_marginEnd="22dp"
+ android:background="@drawable/filtershow_color_picker_circle" />
<Button
- android:id="@+id/draw_color_button03"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:background="@drawable/filtershow_color_picker_circle"
- android:layout_marginEnd="4dp"/>
+ android:id="@+id/draw_color_button03"
+ android:layout_width="@dimen/color_button_width"
+ android:layout_height="@dimen/color_button_height"
+ android:layout_marginEnd="22dp"
+ android:background="@drawable/filtershow_color_picker_circle" />
<Button
- android:id="@+id/draw_color_button04"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:background="@drawable/filtershow_color_picker_circle"
- android:layout_marginEnd="4dp"/>
+ android:id="@+id/draw_color_button04"
+ android:layout_width="@dimen/color_button_width"
+ android:layout_height="@dimen/color_button_height"
+ android:layout_marginEnd="22dp"
+ android:background="@drawable/filtershow_color_picker_circle" />
<Button
- android:id="@+id/draw_color_button05"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:background="@drawable/filtershow_color_picker_circle"
- android:layout_marginEnd="4dp"/>
-
+ android:id="@+id/draw_color_button05"
+ android:layout_width="@dimen/color_button_width"
+ android:layout_height="@dimen/color_button_height"
+ android:layout_marginEnd="22dp"
+ android:background="@drawable/filtershow_color_picker_circle" />
</LinearLayout>
<FrameLayout
- android:background="@color/background_main_toolbar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center">
- <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_marginRight="16dp" >
+
+ <Button
android:id="@+id/draw_color_popupbutton"
android:layout_width="wrap_content"
- android:layout_gravity="center"
android:layout_height="wrap_content"
- android:background="@drawable/ic_action_overflow"
- />
+ android:layout_gravity="center"
+ android:background="@drawable/more2" />
</FrameLayout>
-</LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/filtershow_editor_panel.xml b/res/layout/filtershow_editor_panel.xml
index 9953996..8fc01ec 100644
--- a/res/layout/filtershow_editor_panel.xml
+++ b/res/layout/filtershow_editor_panel.xml
@@ -18,105 +18,56 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/top"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="visible" >
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
+ <!-- <View -->
+ <!-- android:layout_width="match_parent" -->
+ <!-- android:layout_height="1dip" -->
+ <!-- android:background="@color/toolbar_separation_line" /> -->
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
<LinearLayout
- android:id="@+id/controlArea"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_alignParentBottom="true"
- android:visibility="visible">
+ android:id="@+id/controlArea"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentBottom="true"
+ android:background="#000000"
+ android:orientation="horizontal"
+ android:gravity="center"
+ android:visibility="visible" >
+
+<!-- <TextView -->
+<!-- android:id="@+id/tvFilterName" -->
+<!-- android:layout_width="@dimen/swap_button_width" -->
+<!-- android:layout_height="@dimen/swap_button_height" -->
+<!-- android:text="@string/apply_effect" -->
+<!-- android:layout_gravity="left" -->
+<!-- android:textColor="#ffffff" -->
+<!-- android:textSize="20sp" -->
+<!-- android:layout_weight="1"/> -->
<SeekBar
- android:id="@+id/primarySeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- style="@style/FilterShowSlider"/>
-
+ android:id="@+id/primarySeekBar"
+ style="@style/FilterShowSlider"
+ android:layout_width="@dimen/seekbar_width_filter"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|center_horizontal"
+ android:layout_weight="1"
+ android:layout_marginLeft="54dp"
+ android:layout_marginRight="54dp" />
</LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:background="@color/background_main_toolbar"
- android:orientation="horizontal"
- android:baselineAligned="false"
- android:visibility="visible">
-
- <ImageButton
- android:id="@+id/cancelFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left|center_vertical"
- android:background="@android:color/transparent"
- android:layout_weight=".1"
- android:gravity="center"
- android:src="@drawable/ic_menu_cancel_holo_light"
- android:textSize="18dip"/>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <LinearLayout
- android:id="@+id/panelAccessoryViewList"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:visibility="visible">
-
- <com.android.gallery3d.filtershow.editors.SwapButton
- android:id="@+id/applyEffect"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center"
- android:background="@android:color/transparent"
- android:text="@string/apply_effect"
- android:textSize="18dip"
- android:drawableEnd="@drawable/filtershow_menu_marker_rtl"
- android:textAllCaps="true"
- />
-
- </LinearLayout>
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar"/>
-
- <ImageButton
- android:id="@+id/applyFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:layout_weight=".1"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:src="@drawable/ic_menu_done_holo_light"
- android:textSize="18dip"/>
- </LinearLayout>
-
- <FrameLayout android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible" />
-
+ <FrameLayout
+ android:id="@+id/state_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
</LinearLayout>
-</LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/filtershow_export_dialog.xml b/res/layout/filtershow_export_dialog.xml
index 00add15..3b41dda 100644
--- a/res/layout/filtershow_export_dialog.xml
+++ b/res/layout/filtershow_export_dialog.xml
@@ -27,6 +27,9 @@
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"/>
<GridLayout
@@ -35,34 +38,43 @@
android:layout_height="wrap_content"
android:alignmentMode="alignBounds"
android:useDefaultMargins="true"
+ android:layout_marginTop="24dp"
android:columnOrderPreserved="false"
android:columnCount="5">
<TextView
android:text="@string/size"
android:layout_marginStart="8dp"
- android:layout_gravity="start|center_vertical"/>
+ android:layout_gravity="start|center_vertical"
+ android:paddingStart="8dp"
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title"/>
<EditText
android:id="@+id/editableWidth"
android:layout_gravity="right|center_vertical"
+ android:gravity="center"
android:layout_width="70dp"
android:inputType="number"/>
<TextView
android:text="@string/x"
- android:layout_gravity="center"/>
+ android:layout_gravity="center"
+ android:textColor="@color/albumlist_label_title"/>
<EditText
android:id="@+id/editableHeight"
android:layout_gravity="left|center_vertical"
android:layout_width="70dp"
+ android:gravity="center"
android:inputType="number"/>
<TextView
android:id="@+id/estimadedSize"
android:layout_marginEnd="8dp"
- android:layout_gravity="end|center_vertical"/>
+ android:layout_gravity="end|center_vertical"
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title"/>
<LinearLayout
android:layout_columnSpan="5"
@@ -73,7 +85,9 @@
android:text="@string/quality"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
- android:layout_margin="8dp" />
+ android:layout_margin="8dp"
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title" />
<SeekBar
android:id="@+id/qualitySeekBar"
@@ -92,7 +106,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
- android:layout_gravity="end|center_vertical" />
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title"
+ android:layout_gravity="end|center_vertical"
+ />
</LinearLayout>
@@ -103,23 +120,27 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="48dp"
- style="?android:attr/buttonBarStyle">
+ style="?android:attr/buttonBarStyle"
+ android:gravity="right">
<Button
android:id="@+id/cancel"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_weight="1"
android:text="@string/cancel"
- style="?android:attr/buttonBarButtonStyle" />
+ android:textSize="14sp"
+ android:layout_marginRight="8dp"
+ style="?android:attr/buttonBarButtonStyle"
+ android:textColor="#009688"/>
<Button
android:id="@+id/done"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_weight="1"
+ android:textSize="14sp"
android:text="@string/done"
- style="?android:attr/buttonBarButtonStyle"/>
+ style="?android:attr/buttonBarButtonStyle"
+ android:textColor="#009688"/>
</LinearLayout>
diff --git a/res/layout/filtershow_info_panel.xml b/res/layout/filtershow_info_panel.xml
index 1ca64bd..552fef2 100644
--- a/res/layout/filtershow_info_panel.xml
+++ b/res/layout/filtershow_info_panel.xml
@@ -19,8 +19,8 @@
android:minWidth="340dp"
android:layout_height="match_parent"
android:orientation="vertical"
- android:background="@color/background_main_toolbar"
- android:padding="16dp">
+ android:background="@color/albumset_background"
+ android:padding="24dp">
<ScrollView
android:layout_width="match_parent"
@@ -35,29 +35,34 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:weightSum="1"
>
<TextView
android:id="@+id/imageName"
style="?android:textAppearanceSmall"
android:textStyle="bold"
- android:textColor="#80ffffff"
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title"
android:layout_gravity="start"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="start"/>
+ android:gravity="start"
+ android:ellipsize="end"
+ android:layout_weight="0.65"
+ android:maxLines="1"/>
<TextView
android:id="@+id/imageSize"
style="?android:textAppearanceSmall"
android:textAllCaps="true"
- android:textColor="#80ffffff"
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title"
android:textStyle="bold"
android:layout_gravity="end"
+ android:layout_weight="0.35"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:gravity="end"/>
</LinearLayout>
@@ -91,8 +96,9 @@
style="?android:textAppearanceLarge"
android:id="@+id/exifLabel"
android:textStyle="bold"
- android:textColor="#fff"
- android:layout_marginTop="16dp"
+ android:textSize="20sp"
+ android:textColor="@color/filtershow_info_text"
+ android:layout_marginTop="24dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
@@ -102,8 +108,11 @@
android:id="@+id/exifData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
+ android:layout_marginTop="20dp"
+ android:textSize="16sp"
+ android:textColor="@color/albumlist_label_title"
android:layout_gravity="start"
+ android:layout_marginBottom="32dp"
/>
</LinearLayout>
</ScrollView>
diff --git a/res/layout/filtershow_main_panel.xml b/res/layout/filtershow_main_panel.xml
index 1dc4e9f..7a0ead8 100644
--- a/res/layout/filtershow_main_panel.xml
+++ b/res/layout/filtershow_main_panel.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
+ Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ Not a Contribution
+
Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,107 +19,165 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:baselineAligned="false"
- android:orientation="vertical"
- android:animateLayoutChanges="false"
- android:visibility="visible"
- android:background="@color/background_main_toolbar" >
-
- <FrameLayout android:id="@+id/state_panel_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible"
- android:layout_gravity="top"
- android:layout_weight="1" />
-
- <FrameLayout android:id="@+id/category_panel_container"
- android:layout_width="match_parent"
- android:visibility="visible"
- android:layout_height="0dip"
- android:layout_gravity="center"
- android:layout_weight="1"/>
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
+ android:layout_width="match_parent"
+ android:layout_height="80dp"
+ android:animateLayoutChanges="false"
+ android:baselineAligned="false"
+ android:orientation="vertical"
+ android:visibility="visible" >
<com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/bottom_panel"
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:id="@+id/bottom_panel"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center|bottom"
+ android:background="@color/edit_actionbar_background"
+ android:orientation="vertical"
+ custom:max_width="400dip" >
+
+ <FrameLayout
+ android:id="@+id/category_panel_container"
android:layout_width="match_parent"
- android:layout_height="48dip"
- android:layout_gravity="center|bottom"
- custom:max_width="400dip"
- android:orientation="vertical">
+ android:layout_height="0dip"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:visibility="gone" />
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="@color/background_main_toolbar">
+ <LinearLayout
+ android:id="@+id/effectsContainer"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="10dp" >
<ImageButton
- android:id="@+id/fxButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_effects"/>
+ android:id="@+id/fxButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:scaleType="centerInside"
+ android:src="@drawable/color" />
<ImageButton
- android:id="@+id/borderButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_border"/>
+ android:id="@+id/borderButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/frames" />
<ImageButton
- android:id="@+id/geometryButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_fix"/>
+ android:id="@+id/geometryButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/crop" />
<ImageButton
- android:id="@+id/colorsButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
- android:padding="2dip"
- android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_color"/>
+ android:id="@+id/colorsButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/exposure" />
<ImageButton
- android:id="@+id/makeupButton"
- android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:padding="2dip"
- android:background="@drawable/filtershow_button_background"
- android:scaleType="centerInside"
- android:visibility="gone"
- android:src="@drawable/ic_photoeditor_makeup"/>
+ android:id="@+id/makeupButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@android:color/transparent"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/beautify"
+ android:visibility="gone" />
- <ImageButton
+ <ImageButton
android:id="@+id/dualCamButton"
android:layout_width="@dimen/thumbnail_size"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
+ android:background="@android:color/transparent"
android:padding="2dip"
android:scaleType="centerInside"
- android:src="@drawable/ic_photoeditor_dualcam"/>
+ android:src="@drawable/dualcamera"/>
</LinearLayout>
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
+ <LinearLayout
+ android:id="@+id/effectsText"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingTop="5dp" >
+ <TextView
+ android:id="@+id/tvColor"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/color"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvFrames"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/frames"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvCrop"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/crop"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvExposure"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/exposure"
+ android:gravity="center"
+ android:textColor="#ffffff"
+ android:textSize="@dimen/edit_main_font" />
+
+ <TextView
+ android:id="@+id/tvBeautify"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/beautify"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:textSize="@dimen/edit_main_font"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/tvDualCam"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/dualcam"
+ android:gravity="center"
+ android:textColor="#ffffff"
+ android:textSize="@dimen/edit_main_font"
+ android:visibility="gone" />
+ </LinearLayout>
+ </com.android.gallery3d.filtershow.CenteredLinearLayout>
</LinearLayout>
diff --git a/res/layout/filtershow_seekbar.xml b/res/layout/filtershow_seekbar.xml
index 54a874d..f4d5577 100644
--- a/res/layout/filtershow_seekbar.xml
+++ b/res/layout/filtershow_seekbar.xml
@@ -19,14 +19,52 @@
android:id="@+id/top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
+ android:orientation="horizontal"
android:visibility="visible" >
+ <LinearLayout
+ android:id="@+id/basicFilterContainer"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/tvFilterValue"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_gravity="left|center_vertical"
+ android:paddingLeft="23dp"
+ android:paddingTop="20dp"
+ android:textColor="#ffffff"
+ android:textSize="20sp"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/tvFilterName"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_below="@+id/tvFilterValue"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="12dp"
+ android:paddingTop="14dp"
+ android:text="@string/apply_effect"
+ android:textColor="#ffffff"
+ android:textSize="14sp"
+ android:visibility="gone" />
+ </LinearLayout>
+
<SeekBar
android:id="@+id/primarySeekBar"
+ style="@style/FilterShowSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/FilterShowSlider"
+ android:layout_gravity="center_vertical|center_horizontal"
+ android:layout_marginRight="34dp"
+ android:layout_toRightOf="@+id/tvFilterName"
+ android:layout_weight="1"
+ android:paddingTop="20dp"
android:visibility="gone" />
</LinearLayout>
diff --git a/res/layout/filtershow_state_panel_new.xml b/res/layout/filtershow_state_panel_new.xml
index b199695..4ea7c8a 100644
--- a/res/layout/filtershow_state_panel_new.xml
+++ b/res/layout/filtershow_state_panel_new.xml
@@ -5,7 +5,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/background_main_toolbar">
+ android:background="@color/edit_actionbar_background">
<View
android:background="@color/toolbar_separation_line"
diff --git a/res/layout/gallery_main.xml b/res/layout/gallery_main.xml
new file mode 100644
index 0000000..8aa2c07
--- /dev/null
+++ b/res/layout/gallery_main.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+
+<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drawerLayout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <!-- MAIN CONTENT -->
+
+ <RelativeLayout
+ android:id="@+id/gallery_root"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <include layout="@layout/gl_root_group" />
+ </RelativeLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <include
+ android:id="@+id/toolbar"
+ layout="@layout/toolbar" />
+ </LinearLayout>
+
+ <RelativeLayout
+ android:id="@+id/drawerPane"
+ android:layout_width="270dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="start"
+ android:background="#fafafa"
+ android:clickable="true" >
+
+ <!-- Header -->
+
+ <RelativeLayout
+ android:id="@+id/header"
+ android:layout_width="match_parent"
+ android:layout_height="150dp"
+ android:background="@drawable/drawer_bg" >
+
+ <TextView
+ android:id="@+id/appName"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_marginBottom="16dp"
+ android:layout_marginStart="16dp"
+ android:fontFamily="sans-serif"
+ android:text="@string/navigation_drawer_title"
+ android:textColor="#ffffff"
+ android:textSize="24sp" />
+ </RelativeLayout>
+
+ <ListView
+ android:id="@+id/navList"
+ android:layout_width="270dp"
+ android:layout_height="match_parent"
+ android:layout_below="@id/header"
+ android:layout_marginTop="4dp"
+ android:divider="@android:color/transparent" />
+ </RelativeLayout>
+
+</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
diff --git a/res/layout/gl_root_group.xml b/res/layout/gl_root_group.xml
index 76ff33b..de0f66a 100644
--- a/res/layout/gl_root_group.xml
+++ b/res/layout/gl_root_group.xml
@@ -22,5 +22,6 @@
<View android:id="@+id/gl_root_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@android:color/black"/>
+ android:background="#fafafa"
+ />
</merge>
diff --git a/res/layout/photopage_bottom_controls.xml b/res/layout/photopage_bottom_controls.xml
index 20b3c11..fc98822 100644
--- a/res/layout/photopage_bottom_controls.xml
+++ b/res/layout/photopage_bottom_controls.xml
@@ -1,50 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/photopage_bottom_controls"
- android:padding="10dp"
- android:layout_width="match_parent"
+ android:id="@+id/photopage_bottom_controls"
+ android:layout_width="match_parent"
+ android:layout_height="56dp"
+ android:layout_alignParentBottom="true"
+ android:background="#42000000"
+ android:orientation="horizontal"
+ android:visibility="gone" >
+
+ <ImageButton
+ android:id="@+id/photopage_bottom_control_edit"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
- android:orientation="horizontal"
- android:visibility="gone">
- <ImageButton
- android:id="@+id/photopage_bottom_control_edit"
- android:src="@drawable/ic_menu_edit_holo_dark"
- android:background="@drawable/photopage_bottom_button_background"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:layout_alignParentBottom="true"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:paddingStart="15dp"
- android:paddingEnd="15dp"
- android:visibility="gone"/>
- <ImageButton
- android:id="@+id/photopage_bottom_control_panorama"
- android:src="@drawable/ic_view_photosphere"
- android:background="@drawable/transparent_button_background"
- android:layout_width="70dp"
- android:layout_height="70dp"
- android:layout_centerHorizontal="true"
- android:layout_alignParentBottom="true"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:paddingStart="5dp"
- android:paddingEnd="5dp"
- android:visibility="gone"/>
- <ImageButton
- android:id="@+id/photopage_bottom_control_tiny_planet"
- android:src="@drawable/ic_menu_tiny_planet"
- android:background="@drawable/photopage_bottom_button_background"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:layout_alignParentBottom="true"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:paddingStart="15dp"
- android:paddingEnd="15dp"
- android:visibility="gone"/>
+ android:layout_centerVertical="true"
+ android:background="@null"
+ android:paddingStart="20dp"
+ android:layout_marginBottom="20dp"
+ 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_alignParentBottom="true"
+ android:layout_marginBottom="20dp"
+ android:layout_centerInParent="true"
+ android:layout_centerVertical="true"
+ android:background="@null"
+ 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_alignParentBottom="true"
+ android:layout_alignParentEnd="true"
+ android:layout_centerVertical="true"
+ android:layout_marginBottom="20dp"
+ android:background="@null"
+ android:paddingEnd="20dp"
+ android:src="@drawable/delete"
+ android:visibility="gone" />
+
</RelativeLayout>
diff --git a/res/layout/popup_list_item.xml b/res/layout/popup_list_item.xml
index 837da0a..f0bafc1 100644
--- a/res/layout/popup_list_item.xml
+++ b/res/layout/popup_list_item.xml
@@ -19,6 +19,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
+ android:textSize="20sp"
+ android:textColor="#8A000000"
android:singleLine="true"
android:gravity="center_vertical"
android:paddingStart="16dp"
diff --git a/res/layout/toolbar.xml b/res/layout/toolbar.xml
new file mode 100644
index 0000000..0d1cea0
--- /dev/null
+++ b/res/layout/toolbar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+
+<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:elevation="4dp"
+ android:theme="@style/ToolbarTheme"
+ android:popupTheme="@style/ToolbarPopUpTheme"
+ android:navigationIcon="@drawable/drawer" >
+
+</Toolbar>
\ No newline at end of file
diff --git a/res/menu/album.xml b/res/menu/album.xml
index 4db0e51..00fd3ff 100644
--- a/res/menu/album.xml
+++ b/res/menu/album.xml
@@ -15,17 +15,24 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_camera"
- android:icon="@drawable/ic_menu_camera_holo_light"
+ android:icon="@drawable/camera"
android:title="@string/switch_to_camera"
android:showAsAction="ifRoom" />
<item android:id="@+id/action_slideshow"
- android:icon="@drawable/ic_menu_slideshow_holo_light"
+ android:icon="@drawable/slideshow"
android:title="@string/slideshow"
- android:showAsAction="never" />
+ android:showAsAction="ifRoom" />
<item android:id="@+id/action_select"
android:title="@string/select_item"
android:showAsAction="never" />
- <item android:id="@+id/action_group_by"
- android:title="@string/group_by"
- android:showAsAction="never"/>
+<!-- <item android:id="@+id/action_group_by" -->
+<!-- android:title="@string/group_by" -->
+<!-- android:showAsAction="never"/> -->
+ <item android:id="@+id/action_view_type"
+ android:showAsAction="never"
+ />
+ <item android:id="@+id/action_sync_picasa_albums"
+ android:title="@string/sync_picasa_albums"
+ android:showAsAction="never"
+ android:visible="false" />
</menu>
diff --git a/res/menu/filtershow_activity_menu.xml b/res/menu/filtershow_activity_menu.xml
index bb0b094..9a16e03 100644
--- a/res/menu/filtershow_activity_menu.xml
+++ b/res/menu/filtershow_activity_menu.xml
@@ -6,16 +6,16 @@
android:enabled="false"
android:visible="false"
android:title="@string/share"/>
- <item
- android:id="@+id/undoButton"
- android:icon="@drawable/filtershow_button_undo"
- android:showAsAction="always"
- android:title="@string/filtershow_undo"/>
- <item
- android:id="@+id/redoButton"
- android:icon="@drawable/filtershow_button_redo"
- android:showAsAction="always"
- android:title="@string/filtershow_redo"/>
+<!-- <item -->
+<!-- android:id="@+id/undoButton" -->
+<!-- android:icon="@drawable/filtershow_button_undo" -->
+<!-- android:showAsAction="always" -->
+<!-- android:title="@string/filtershow_undo"/> -->
+<!-- <item -->
+<!-- android:id="@+id/redoButton" -->
+<!-- android:icon="@drawable/filtershow_button_redo" -->
+<!-- android:showAsAction="always" -->
+<!-- android:title="@string/filtershow_redo"/> -->
<item
android:id="@+id/resetHistoryButton"
android:title="@string/reset"/>
@@ -24,11 +24,11 @@
android:showAsAction="never"
android:visible="true"
android:title="@string/filtershow_show_info_panel" />
- <item
- android:id="@+id/showImageStateButton"
- android:showAsAction="never"
- android:visible="true"
- android:title="@string/show_imagestate_panel" />
+<!-- <item -->
+<!-- android:id="@+id/showImageStateButton" -->
+<!-- android:showAsAction="never" -->
+<!-- android:visible="true" -->
+<!-- android:title="@string/show_imagestate_panel" /> -->
<item
android:id="@+id/manageUserPresets"
android:showAsAction="never"
diff --git a/res/menu/operation.xml b/res/menu/operation.xml
index ffc5afa..b34cd68 100644
--- a/res/menu/operation.xml
+++ b/res/menu/operation.xml
@@ -30,14 +30,14 @@
android:showAsAction="ifRoom">
</item>
<item android:id="@+id/action_share"
- android:icon="@drawable/ic_menu_share_holo_light"
+ android:icon="@drawable/multiselect_share"
android:title="@string/share"
android:visible="false"
android:actionProviderClass="android.widget.ShareActionProvider"
android:showAsAction="never">
</item>
<item android:id="@+id/action_delete"
- android:icon="@drawable/ic_menu_trash_holo_light"
+ android:icon="@drawable/multiselect_delete"
android:title="@string/delete"
android:visible="false"
android:showAsAction="ifRoom" />
diff --git a/res/menu/photo.xml b/res/menu/photo.xml
index 67e700b..d02a8c9 100644
--- a/res/menu/photo.xml
+++ b/res/menu/photo.xml
@@ -14,52 +14,52 @@
limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@+id/action_import"
- android:title="@string/Import"
- android:icon="@drawable/ic_menu_ptp_holo_light"
- android:showAsAction="always|withText"
- android:visible="false" />
- <!-- Ideally, showAsAction for share_panorama and share should be reversed.
- But, if share_panorama is set to never, it doesn't seem to get promoted
- to the action bar and stays on the overflow menu. -->
- <item android:id="@+id/action_share_panorama"
- android:icon="@drawable/ic_menu_share_holo_light"
- android:title="@string/share_panorama"
- android:visible="false"
- android:actionProviderClass="android.widget.ShareActionProvider"
- android:showAsAction="ifRoom" />
- <item android:id="@+id/action_share"
- android:icon="@drawable/ic_menu_share_holo_light"
- android:title="@string/share"
- android:visible="false"
- android:actionProviderClass="android.widget.ShareActionProvider"
- android:showAsAction="never" />
- <item android:id="@+id/action_delete"
- android:icon="@drawable/ic_menu_trash_holo_light"
- android:title="@string/delete"
- android:visible="false"
- android:showAsAction="never" />
+<!-- <item android:id="@+id/action_import" -->
+<!-- android:title="@string/Import" -->
+<!-- android:icon="@drawable/ic_menu_ptp_holo_light" -->
+<!-- android:showAsAction="always|withText" -->
+<!-- android:visible="false" /> -->
+<!-- Ideally, showAsAction for share_panorama and share should be reversed. -->
+<!-- But, if share_panorama is set to never, it doesn't seem to get promoted -->
+<!-- to the action bar and stays on the overflow menu. -->
+<!-- <item android:id="@+id/action_share_panorama" -->
+<!-- android:icon="@drawable/ic_menu_share_holo_light" -->
+<!-- android:title="@string/share_panorama" -->
+<!-- android:visible="false" -->
+<!-- android:actionProviderClass="android.widget.ShareActionProvider" -->
+<!-- android:showAsAction="ifRoom" /> -->
+<!-- <item android:id="@+id/action_share" -->
+<!-- android:icon="@drawable/ic_menu_share_holo_light" -->
+<!-- android:title="@string/share" -->
+<!-- android:visible="false" -->
+<!-- android:actionProviderClass="android.widget.ShareActionProvider" -->
+<!-- android:showAsAction="never" /> -->
+<!-- <item android:id="@+id/action_delete" -->
+<!-- android:icon="@drawable/ic_menu_trash_holo_light" -->
+<!-- android:title="@string/delete" -->
+<!-- android:visible="false" -->
+<!-- android:showAsAction="never" /> -->
<item android:id="@+id/action_slideshow"
android:icon="@drawable/ic_menu_slideshow_holo_light"
android:title="@string/slideshow"
android:showAsAction="never" />
- <item android:id="@+id/action_edit"
- android:title="@string/edit"
- android:showAsAction="never"
- android:visible="false" />
- <item android:id="@+id/action_simple_edit"
- android:title="@string/simple_edit"
- android:showAsAction="never"
- android:visible="false" />
- <item android:id="@+id/action_rotate_ccw"
- android:showAsAction="never"
- android:title="@string/rotate_left" />
- <item android:id="@+id/action_rotate_cw"
- android:showAsAction="never"
- android:title="@string/rotate_right" />
- <item android:id="@+id/action_crop"
- android:title="@string/crop_action"
- android:showAsAction="never" />
+<!-- <item android:id="@+id/action_edit" -->
+<!-- android:title="@string/edit" -->
+<!-- android:showAsAction="never" -->
+<!-- android:visible="false" /> -->
+<!-- <item android:id="@+id/action_simple_edit" -->
+<!-- android:title="@string/simple_edit" -->
+<!-- android:showAsAction="never" -->
+<!-- android:visible="false" /> -->
+<!-- <item android:id="@+id/action_rotate_ccw" -->
+<!-- android:showAsAction="never" -->
+<!-- android:title="@string/rotate_left" /> -->
+<!-- <item android:id="@+id/action_rotate_cw" -->
+<!-- android:showAsAction="never" -->
+<!-- android:title="@string/rotate_right" /> -->
+<!-- <item android:id="@+id/action_crop" -->
+<!-- android:title="@string/crop_action" -->
+<!-- android:showAsAction="never" /> -->
<item android:id="@+id/action_trim"
android:title="@string/trim_action"
android:showAsAction="never" />
diff --git a/res/mipmap-hdpi/ic_launcher_gallery.png b/res/mipmap-hdpi/ic_launcher_gallery.png
index 23ea998..a6eaaa3 100644
--- a/res/mipmap-hdpi/ic_launcher_gallery.png
+++ b/res/mipmap-hdpi/ic_launcher_gallery.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_gallery.png b/res/mipmap-xhdpi/ic_launcher_gallery.png
index 79544a2..345bbee 100644
--- a/res/mipmap-xhdpi/ic_launcher_gallery.png
+++ b/res/mipmap-xhdpi/ic_launcher_gallery.png
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_launcher_gallery.png b/res/mipmap-xxhdpi/ic_launcher_gallery.png
new file mode 100644
index 0000000..b064bdb
--- /dev/null
+++ b/res/mipmap-xxhdpi/ic_launcher_gallery.png
Binary files differ
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 20b2930..9fd9192 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -14,18 +14,20 @@
limitations under the License.
-->
<resources>
- <color name="default_background">#000</color>
+
+ <color name="default_background">#fafafa</color>
<!-- configuration for album set page -->
- <color name="albumset_background">#1A1A1A</color>
- <color name="albumset_placeholder">#333</color>
- <color name="albumset_label_background">#EE414143</color>
- <color name="albumset_label_title">#FBFBFB</color>
- <color name="albumset_label_count">#A9ABAD</color>
+ <color name="albumset_background">#fafafa</color>
+ <color name="albumset_placeholder">#75000000</color>
+ <color name="albumset_label_background">#8A000000</color> <!-- 54% alpha -->
+ <color name="albumset_label_title">#FFFFFF</color>
+ <color name="albumset_label_count">#FFFFFF</color>
+ <color name="albumlist_label_title">#8E000000</color>
<!-- configuration for album page -->
- <color name="album_background">#1A1A1A</color>
- <color name="album_placeholder">#333</color>
+ <color name="album_background">#fafafa</color>
+ <color name="album_placeholder">#75000000</color>
<!-- configuration for photo page -->
<color name="photo_background">#1A1A1A</color>
@@ -74,4 +76,12 @@
<color name="lowlight">#650101</color>
<color name="grey">#e7e7e7</color>
<color name="disabled_knob">#575757</color>
+ <color name="toolbar_theme">#e53935</color>
+ <color name="multiselect_background">#ffffff</color>
+ <color name="edit_background">#212121</color>
+ <color name="edit_actionbar_background">#8A000000</color>
+ <color name="dialog_button_color">#009688</color>
+ <color name="timeline_title_text_color">#26000000</color>
+ <color name="timeline_title_number_text_color">#1a000000</color>
+ <color name="timeline_title_background_color">#fafafa</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ef742d2..2b72812 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -112,23 +112,50 @@
<!-- configuration for legacy album set page -->
<integer name="albumset_rows_land">2</integer>
<integer name="albumset_rows_port">3</integer>
- <dimen name="albumset_padding_top">7dp</dimen>
- <dimen name="albumset_padding_bottom">7dp</dimen>
- <dimen name="albumset_slot_gap">7dp</dimen>
+ <integer name="albumset_cols_land">3</integer>
+ <integer name="albumset_cols_port">2</integer>
- <dimen name="albumset_label_background_height">30dp</dimen>
- <dimen name="albumset_title_offset">10dp</dimen>
- <dimen name="albumset_count_offset">10dp</dimen>
- <dimen name="albumset_title_font_size">12sp</dimen>
- <dimen name="albumset_count_font_size">9sp</dimen>
+ <dimen name="albumset_padding_top">4dp</dimen>
+ <dimen name="albumset_padding_bottom">4dp</dimen>
+ <dimen name="albumset_padding_left">4dp</dimen>
+ <dimen name="albumset_padding_right">4dp</dimen>
+ <dimen name="albumset_slot_gap">4dp</dimen>
+ <dimen name="albumset_label_background_height">48dp</dimen>
+ <dimen name="albumset_title_offset">12dp</dimen>
+ <dimen name="albumset_count_offset">18dp</dimen>
+ <dimen name="albumset_title_font_size">16sp</dimen>
+ <dimen name="albumset_count_font_size">16sp</dimen>
<dimen name="albumset_left_margin">2dp</dimen>
<dimen name="albumset_title_right_margin">20dp</dimen>
+ <dimen name="albumset_title_left_margin">12dp</dimen>
+ <dimen name="albumset_count_right_margin">18dp</dimen>
<dimen name="albumset_icon_size">25dp</dimen>
+ <!-- configuration for albumset page in Landscape-->
+ <dimen name="albumset_slot_gap_land">29dp</dimen>
+ <dimen name="albumset_padding_top_land">30dp</dimen>
+ <dimen name="albumset_padding_bottom_land">30dp</dimen>
+ <dimen name="albumset_padding_left_land">30dp</dimen>
+ <dimen name="albumset_padding_right_land">30dp</dimen>
+
<!-- configuration for album page -->
<integer name="album_rows_land">2</integer>
<integer name="album_rows_port">4</integer>
- <dimen name="album_slot_gap">5dp</dimen>
+ <integer name="album_cols_land">5</integer>
+ <integer name="album_cols_port">3</integer>
+
+ <dimen name="album_slot_gap">3dp</dimen>
+ <dimen name="album_padding_top">3dp</dimen>
+ <dimen name="album_padding_bottom">3dp</dimen>
+ <dimen name="album_padding_left">3dp</dimen>
+ <dimen name="album_padding_right">3dp</dimen>
+
+ <!-- configuration for album page in Landscape-->
+ <dimen name="album_slot_gap_land">7dp</dimen>
+ <dimen name="album_padding_top_land">16dp</dimen>
+ <dimen name="album_padding_bottom_land">7dp</dimen>
+ <dimen name="album_padding_left_land">16dp</dimen>
+ <dimen name="album_padding_right_land">16dp</dimen>
<!-- configuration for manage page -->
<dimen name="cache_pin_size">24dp</dimen>
@@ -152,4 +179,32 @@
<dimen name="photoeditor_text_padding">10dp</dimen>
<dimen name="photoeditor_original_text_size">18dp</dimen>
<dimen name="photoeditor_original_text_margin">4dp</dimen>
+ <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="slot_width_album">116dp</dimen>
+ <dimen name="slot_height_album">116dp</dimen>
+
+ <!-- configuration for album page in listview -->
+ <integer name="albumlist_cols_land">1</integer>
+ <integer name="albumlist_cols_port">1</integer>
+
+ <dimen name="albumlist_padding_top">18dp</dimen>
+ <dimen name="slot_height_albumlist">40dp</dimen>
+ <dimen name="albumlist_slot_gap">18dp</dimen>
+ <dimen name="albumlist_thumb_size">40dp</dimen>
+ <dimen name="albumlist_left_margin">16dp</dimen>
+ <dimen name="albumlist_title_margin">16dp</dimen>
+ <dimen name="albumlist_title_font_size">16sp</dimen>
+ <dimen name="albumlist_label_background_height">40dp</dimen>
+ <dimen name= "edit_main_font">13sp</dimen>
+ <dimen name="dialog_text_size">14sp</dimen>
+
+ <dimen name="timeline_port_slot_gap">3dp</dimen>
+ <dimen name="timeline_land_slot_gap">7dp</dimen>
+ <dimen name="timeline_land_margin">16dp</dimen>
+ <dimen name="timeline_port_margin">3dp</dimen>
+ <dimen name="timeline_title_height">48dp</dimen>
+ <dimen name="timeline_title_font_size">14sp</dimen>
</resources>
diff --git a/res/values/filtershow_color.xml b/res/values/filtershow_color.xml
index 4fb4495..fbfedc4 100644
--- a/res/values/filtershow_color.xml
+++ b/res/values/filtershow_color.xml
@@ -20,7 +20,7 @@
<color name="red">#FF0000</color>
<color name="blue">#0000FF</color>
<color name="text_toolbar">#FFFFFF</color>
- <color name="background_screen">#101010</color>
+ <color name="background_screen">#212121</color>
<color name="background_toolbar">#363949</color>
<color name="background_main_toolbar">#232323</color>
<color name="toolbar_separation_line">#333333</color>
@@ -36,7 +36,7 @@
<color name="filtershow_stateview_selected_background">#c8c8c8</color>
<color name="filtershow_stateview_selected_text">#000000</color>
<color name="filtershow_categoryview_background">#1a1a1a</color>
- <color name="filtershow_categoryview_text">#a7a7a7</color>
+ <color name="filtershow_categoryview_text">#ffffff</color>
<color name="filtershow_category_selection">#ffffffff</color>
<color name="gradcontrol_point_center">#ffffffff</color>
<color name="gradcontrol_point_edge">#ffffffff</color>
@@ -49,5 +49,7 @@
<color name="draw_rect_border">#888888</color>
<color name="color_chooser_unslected_border">#00000000</color>
<color name="color_chooser_slected_border">#a7a7a7</color>
+ <color name="filtershow_image_mask">#4d000000</color>
+ <color name="filtershow_info_text">#DE000000</color>
</resources>
\ No newline at end of file
diff --git a/res/values/filtershow_strings.xml b/res/values/filtershow_strings.xml
index 57a858b..fdc8f6a 100644
--- a/res/values/filtershow_strings.xml
+++ b/res/values/filtershow_strings.xml
@@ -340,4 +340,9 @@
<string name="fusion_pick_underlay">Pick Underlay</string>
<string name="dualcam_no_segment_toast">No segment found at this point</string>
+ <string name="color">Color</string>
+ <string name="frames">Frames</string>
+ <string name="beautify">Beautify</string>
+ <string name="dualcam">Dual Camera</string>
+
</resources>
diff --git a/res/values/filtershow_styles.xml b/res/values/filtershow_styles.xml
index 4162ccd..1e97acc 100644
--- a/res/values/filtershow_styles.xml
+++ b/res/values/filtershow_styles.xml
@@ -58,7 +58,7 @@
<item name="android:indeterminateDrawable">@drawable/filtershow_slider</item>
<item name="android:minHeight">13dip</item>
<item name="android:maxHeight">13dip</item>
- <item name="android:thumb">@drawable/filtershow_scrubber</item>
+ <item name="android:thumb">@drawable/adjust</item>
<item name="android:thumbOffset">16dip</item>
<item name="android:focusable">true</item>
<item name="android:paddingStart">16dip</item>
diff --git a/res/values/filtershow_values.xml b/res/values/filtershow_values.xml
index a788afe..efa7ccb 100644
--- a/res/values/filtershow_values.xml
+++ b/res/values/filtershow_values.xml
@@ -16,7 +16,7 @@
<resources>
<!-- Specify the screen orientation -->
- <bool name="only_use_portrait">true</bool>
+ <bool name="only_use_portrait">false</bool>
<!-- Text size for the state panel -->
<dimen name="state_panel_text_size">16dip</dimen>
@@ -28,7 +28,7 @@
<dimen name="category_panel_icon_size">64dip</dimen>
<!-- Category Panel Text Size -->
- <dimen name="category_panel_text_size">13dip</dimen>
+ <dimen name="category_panel_text_size">13sp</dimen>
<!-- Category Panel Text Size -->
<dimen name="category_panel_margin">4dip</dimen>
@@ -65,4 +65,16 @@
<!-- Glow effect size -->
<dimen name="edge_glow_size">50dip</dimen>
+ <dimen name="swap_button_width">168dp</dimen>
+ <dimen name="swap_button_height">32dp</dimen>
+ <dimen name="compare_margin_top">104dp</dimen>
+ <dimen name="compare_margin_right">10dp</dimen>
+ <dimen name="compare_margin_top_scaled">96dp</dimen>
+ <dimen name="compare_margin_right_scaled">60dp</dimen>
+ <dimen name="color_button_width">36dp</dimen>
+ <dimen name="color_button_height">36dp</dimen>
+ <dimen name="seekbar_width_filter">216dp</dimen>
+ <dimen name="scaled_image_height">454dp</dimen>
+ <dimen name="scaled_image_width">330dp</dimen>
+
</resources>
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b553dbd..405c443 100755
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -107,7 +107,7 @@
<string name="wallpaper">Setting wallpaper\u2026</string>
<string name="camera_setas_wallpaper">Wallpaper</string>
<!-- Toast message for share items -->
- <string name="cannot_share_items">Selected items for share should less than 300</string>
+ <string name="cannot_share_items">Max selected items for share is 300</string>
<!-- Details dialog "OK" button. Dismisses dialog. -->
<string name="delete">Delete</string>
@@ -542,7 +542,7 @@
<string name="pano_progress_text">Rendering panorama</string>
<!-- The label on the button that will save an edited image -->
- <string name="save" msgid="8140440041190264400">Save</string>
+ <string name="save" msgid="8140440041190264400">Done</string>
<!-- A label representing the action of importing media item(s) [CHAR LIMIT=20] -->
<string name="ingest_import">@string/Import</string>
@@ -1135,6 +1135,11 @@
<item quantity="other">%1$d photos</item>
</plurals>
+ <plurals name="number_of_videos">
+ <item quantity="one">%1$d Video</item>
+ <item quantity="other">%1$d Videos</item>
+ </plurals>
+
<!-- The label for the bass boost knob of the audio effects dialog. -->
<string name="bass_boost_strength">Bass boost</string>
@@ -1160,7 +1165,25 @@
<string name="action_consumes_rights">Rights will be consumed for playing this media</string>
<string name="text_makeup_whiten">Whiten</string>
<string name="text_makeup_Soften">Soften</string>
+
+ <string-array name="title_array_nav_items">
+ <item>Timeline</item>
+ <item>Albums</item>
+ <item>Videos</item>
+ </string-array>
+
+ <string name="navigation_drawer_title">Gallery</string>
+ <!-- Timeline screen title -->
+ <string name="timeline_title">Timeline</string>
+ <!-- Albums screen title -->
+ <string name="albums_title">Albums</string>
+ <!-- Videos screen title -->
+ <string name="videos_title">Videos</string>
+ <string name="action_viewtype_list">List view</string>
+ <string name="action_viewtype_grid">Grid view</string>
+ <string name="tvEmptyAlbum">No photos found</string>
+ <string name="tvEmptyVideos">No videos found</string>
<string name="text_makeup_trimface">Trimface</string>
<string name="text_makeup_bigeye">Bigeye</string>
-
+ <string name="drawer_desc">drawer</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 14e8e29..e4b02fc 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -19,17 +19,23 @@
<item name="listPreferredItemHeightSmall">48dp</item>
<item name="switchStyle">@android:style/Widget.CompoundButton</item>
</style>
- <style name="Theme.Gallery.Dialog" parent="android:Theme.Holo.Dialog"/>
- <style name="Theme.Gallery" parent="Theme.GalleryBase">
- <item name="android:displayOptions"></item>
+
+ <style name="Theme.Gallery.Dialog" parent="android:Theme.Holo.Dialog" />
+
+ <style name="Theme.Gallery" parent="android:Theme.Material.Light">
<item name="android:windowContentOverlay">@null</item>
- <item name="android:actionBarStyle">@style/Holo.ActionBar</item>
- <item name="android:windowBackground">@android:color/black</item>
- <item name="android:colorBackground">@null</item>
<item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <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: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>
</style>
<style name="Theme.Crop" parent="Theme.GalleryBase">
<item name="android:displayOptions"></item>
@@ -297,4 +303,37 @@
<item name="android:drawablePadding">8dp</item>
<item name="android:background">@drawable/bg_pressed</item>
</style>
+
+ <style name="AppTheme" parent="android:Theme.Material.Light">
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:windowTranslucentStatus">true</item>
+ <item name="android:windowTranslucentNavigation">false</item>
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowActionModeOverlay">true</item>
+ <item name="android:actionModeBackground">@color/multiselect_background</item>
+ <item name="android:actionModeShareDrawable">@drawable/multiselect_share</item>
+ <item name="android:actionOverflowButtonStyle">@style/MyOverFlow</item>
+ <item name="android:homeAsUpIndicator">@drawable/back</item>
+ <item name="android:actionModeCloseDrawable">@drawable/multiselected_back</item>
+ </style>
+
+ <style name="QueryTheme" parent="android:Theme.Material">
+ <item name="android:statusBarColor">#ab5810</item>
+ </style>
+
+ <style name="ToolbarTheme" parent="android:Theme.Material" />
+
+ <style name="ToolbarPopUpTheme" parent="android:Theme.Material.Light" />
+
+ <!-- Styles -->
+ <style name="MyOverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
+ <item name="android:src">@drawable/multiselect_more</item>
+ </style>
+ <style name="EditOverflow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
+ <item name="android:src">@drawable/more</item>
+ </style>
+ <style name="FilterShowActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
+ <item name="android:background">@color/edit_actionbar_background</item>
+ </style>
</resources>
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
index 84a9b57..915fc94 100644
--- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java
+++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
@@ -37,6 +37,7 @@
import android.view.MenuItem;
import android.view.Window;
import android.view.WindowManager;
+import android.widget.Toolbar;
import android.os.Handler;
import com.android.gallery3d.R;
@@ -62,6 +63,7 @@
private boolean mDisableToggleStatusBar;
private PanoramaViewHelper mPanoramaViewHelper;
private static final int ONRESUME_DELAY = 50;
+ private Toolbar mToolbar;
private AlertDialog mAlertDialog = null;
private BroadcastReceiver mMountReceiver = new BroadcastReceiver() {
@@ -76,7 +78,6 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mOrientationManager = new OrientationManager(this);
- toggleStatusBarByOrientation();
getWindow().setBackgroundDrawable(null);
mPanoramaViewHelper = new PanoramaViewHelper(this);
mPanoramaViewHelper.onCreate();
@@ -100,7 +101,6 @@
mStateManager.onConfigurationChange(config);
getGalleryActionBar().onConfigurationChanged();
invalidateOptionsMenu();
- toggleStatusBarByOrientation();
}
@Override
@@ -314,18 +314,6 @@
mDisableToggleStatusBar = true;
}
- // Shows status bar in portrait view, hide in landscape view
- private void toggleStatusBarByOrientation() {
- if (mDisableToggleStatusBar) return;
-
- Window win = getWindow();
- if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
- win.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
- } else {
- win.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
- }
- }
-
public TransitionStore getTransitionStore() {
return mTransitionStore;
}
@@ -392,4 +380,12 @@
Log.e(TAG, "Error printing an image", fnfe);
}
}
+
+ public Toolbar getToolbar() {
+ return mToolbar;
+ }
+
+ public void setToolbar(Toolbar toolbar) {
+ mToolbar = toolbar ;
+ }
}
diff --git a/src/com/android/gallery3d/app/ActivityState.java b/src/com/android/gallery3d/app/ActivityState.java
index 2f1e0c9..11be8c6 100644
--- a/src/com/android/gallery3d/app/ActivityState.java
+++ b/src/com/android/gallery3d/app/ActivityState.java
@@ -205,9 +205,6 @@
actionBar.show();
}
int stateCount = mActivity.getStateManager().getStateCount();
- mActivity.getGalleryActionBar().setDisplayOptions(stateCount > 1, true);
- // Default behavior, this can be overridden in ActivityState's onResume.
- actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
}
activity.invalidateOptionsMenu();
diff --git a/src/com/android/gallery3d/app/AlbumListViewPage.java b/src/com/android/gallery3d/app/AlbumListViewPage.java
new file mode 100644
index 0000000..a207cb9
--- /dev/null
+++ b/src/com/android/gallery3d/app/AlbumListViewPage.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package com.android.gallery3d.app;
+
+public class AlbumListViewPage extends AlbumPage {
+
+}
diff --git a/src/com/android/gallery3d/app/AlbumPage.java b/src/com/android/gallery3d/app/AlbumPage.java
index bd9f017..65442d0 100644
--- a/src/com/android/gallery3d/app/AlbumPage.java
+++ b/src/com/android/gallery3d/app/AlbumPage.java
@@ -20,6 +20,7 @@
import android.content.Context;
import android.content.Intent;
//import android.drm.DrmHelper;
+import android.graphics.Color;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
@@ -27,11 +28,15 @@
import android.os.Message;
import android.provider.MediaStore;
import android.text.TextUtils;
+import android.util.TypedValue;
+import android.view.Gravity;
import android.view.HapticFeedbackConstants;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
import android.widget.Toast;
import com.android.gallery3d.R;
@@ -76,6 +81,8 @@
public static final String KEY_SHOW_CLUSTER_MENU = "cluster-menu";
public static final String KEY_EMPTY_ALBUM = "empty-album";
public static final String KEY_RESUME_ANIMATION = "resume_animation";
+ public static final String KEY_IS_VIDEOS_SCREEN = "is-videos-screen";
+ public static final String KEY_VIEWTYPE = "viewtype";
private static final int REQUEST_SLIDESHOW = 1;
public static final int REQUEST_PHOTO = 2;
@@ -100,7 +107,8 @@
protected SelectionManager mSelectionManager;
private boolean mGetContent;
- private boolean mShowClusterMenu;
+ //private boolean mShowClusterMenu;
+ private boolean mIsVideoScreen;
private ActionModeHandler mActionModeHandler;
private int mFocusIndex = 0;
@@ -124,6 +132,20 @@
private static final int MSG_PICK_PHOTO = 0;
private PhotoFallbackEffect mResumeEffect;
+
+ private Config.AlbumPage mConfig;
+ private Config.AlbumPageList mConfigList;
+ private GalleryActionBar mActionBar;
+
+ public static final int GRID_VIEW = 0;
+ public static final int LIST_VIEW = 1;
+ public static int mCurrentView = GRID_VIEW;
+ private final String PREF_VIEWTYPE = "albumview-type";
+ public boolean mViewType = true;
+ private Bundle mData;
+ private MenuItem mItemViewType;
+ private TextView tvEmptyAlbum;
+ private boolean mShowedEmptyToastForSelf;
private PhotoFallbackEffect.PositionProvider mPositionProvider =
new PhotoFallbackEffect.PositionProvider() {
@Override
@@ -159,21 +181,51 @@
protected void onLayout(
boolean changed, int left, int top, int right, int bottom) {
- int slotViewTop = mActivity.getGalleryActionBar().getHeight();
- int slotViewBottom = bottom - top;
- int slotViewRight = right - left;
+ int paddingLeft;
+ int paddingBottom;
+ int paddingRight;
+ int paddingTop;
+
+ if (right - left > bottom - top) {
+ if (mViewType) {
+ paddingTop = mConfig.paddingLeft;
+ } else {
+ paddingTop = mConfigList.paddingLeft;
+ }
+ paddingBottom = mConfig.paddingBottomLand;
+ paddingRight = mConfig.paddingRightLand;
+ paddingLeft = mConfig.paddingLeftLand;
+ }
+ else {
+ if (mViewType) {
+ paddingTop = mConfig.paddingLeft;
+ paddingLeft = mConfig.paddingLeft;
+ } else {
+ paddingTop = mConfigList.paddingLeft;
+ paddingLeft = mConfigList.paddingLeft;
+ }
+ paddingBottom = mConfig.paddingBottom;
+ paddingRight = mConfig.paddingRight;
+ }
+ int slotViewTop = mActivity.getGalleryActionBar().getHeight()
+ + paddingTop;
+ int slotViewBottom = bottom - top - paddingBottom;
+ int slotViewRight = right - left - paddingRight;
+ int slotViewLeft = paddingLeft;
if (mShowDetails) {
- mDetailsHelper.layout(left, slotViewTop, right, bottom);
+ mDetailsHelper.layout(slotViewLeft, slotViewTop, slotViewRight, slotViewBottom);
} else {
mAlbumView.setHighlightItemPath(null);
}
// Set the mSlotView as a reference point to the open animation
mOpenCenter.setReferencePosition(0, slotViewTop);
- mSlotView.layout(0, slotViewTop, slotViewRight, slotViewBottom);
- GalleryUtils.setViewPointMatrix(mMatrix,
- (right - left) / 2, (bottom - top) / 2, -mUserDistance);
+ mSlotView.layout(slotViewLeft, slotViewTop, slotViewRight,
+ slotViewBottom);
+
+ GalleryUtils.setViewPointMatrix(mMatrix, (right - left) / 2,
+ (bottom - top) / 2, -mUserDistance);
}
@Override
@@ -213,6 +265,8 @@
hideDetails();
} else if (mSelectionManager.inSelectionMode()) {
mSelectionManager.leaveSelectionMode();
+ } else if (mIsVideoScreen) {
+ super.onBackPressed();
} else {
if(mLaunchedFromPhotoPage) {
mActivity.getTransitionStore().putIfNotPresent(
@@ -233,6 +287,10 @@
if (mInCameraApp) {
GalleryUtils.startGalleryActivity(mActivity);
} else if (mActivity.getStateManager().getStateCount() > 1) {
+ mActivity.getToolbar().setNavigationContentDescription(mActivity.getResources().
+ getString(R.string.drawer_desc));
+ mActivity.getToolbar().setNavigationIcon(R.drawable.drawer);
+ ((GalleryActivity)mActivity).toggleNavDrawer(true);
super.onBackPressed();
} else if (mParentMediaSetString != null) {
Bundle data = new Bundle(getData());
@@ -347,6 +405,7 @@
data.putBoolean(PhotoPage.KEY_START_IN_FILMSTRIP,
startInFilmstrip);
data.putBoolean(PhotoPage.KEY_IN_CAMERA_ROLL, mMediaSet.isCameraRoll());
+ data.putBoolean(PhotoPage.KEY_FROM_VIDEOS_SCREEN, mIsVideoScreen);
if (startInFilmstrip) {
mActivity.getStateManager().switchState(this, FilmstripPage.class, data);
} else {
@@ -392,14 +451,6 @@
String newPath = FilterUtils.newClusterPath(basePath, clusterType);
Bundle data = new Bundle(getData());
data.putString(AlbumSetPage.KEY_MEDIA_PATH, newPath);
- if (mShowClusterMenu) {
- Context context = mActivity.getAndroidContext();
- data.putString(AlbumSetPage.KEY_SET_TITLE, mMediaSet.getName());
- data.putString(AlbumSetPage.KEY_SET_SUBTITLE,
- GalleryActionBar.getClusterByTypeString(context, clusterType));
- }
-
- // mAlbumView.savePositions(PositionRepository.getInstance(mActivity));
mActivity.getStateManager().startStateForResult(
AlbumSetPage.class, REQUEST_DO_ANIMATION, data);
}
@@ -408,12 +459,17 @@
protected void onCreate(Bundle data, Bundle restoreState) {
super.onCreate(data, restoreState);
mUserDistance = GalleryUtils.meterToPixel(USER_DISTANCE_METER);
+ mCurrentView = GalleryUtils.getIntPref(mActivity, PREF_VIEWTYPE,
+ GRID_VIEW);
+ mViewType = mCurrentView == GRID_VIEW;
+ mData = data;
initializeViews();
initializeData(data);
mGetContent = data.getBoolean(GalleryActivity.KEY_GET_CONTENT, false);
- mShowClusterMenu = data.getBoolean(KEY_SHOW_CLUSTER_MENU, false);
+ mIsVideoScreen = data.getBoolean(KEY_IS_VIDEOS_SCREEN, false);
mDetailsSource = new MyDetailsSource();
Context context = mActivity.getAndroidContext();
+ mActionBar = mActivity.getGalleryActionBar();
if (data.getBoolean(KEY_AUTO_SELECT_ALL)) {
mSelectionManager.selectAll();
@@ -454,12 +510,12 @@
boolean enableHomeButton = (mActivity.getStateManager().getStateCount() > 1) |
mParentMediaSetString != null;
- GalleryActionBar actionBar = mActivity.getGalleryActionBar();
- actionBar.setDisplayOptions(enableHomeButton, false);
- if (!mGetContent) {
- actionBar.enableAlbumModeMenu(GalleryActionBar.ALBUM_GRID_MODE_SELECTED, this);
+ //GalleryActionBar actionBar = mActivity.getGalleryActionBar();
+ mActionBar.setDisplayOptions(enableHomeButton, true);
+ if (enableHomeButton) {
+ mActivity.getToolbar().setNavigationContentDescription("back");
+ mActivity.getToolbar().setNavigationIcon(R.drawable.back);
}
-
// Set the reload bit here to prevent it exit this page in clearLoadingBit().
setLoadingBit(BIT_LOADING_RELOAD);
mLoadingFailed = false;
@@ -488,9 +544,6 @@
mAlbumDataAdapter.pause();
mAlbumView.pause();
DetailsHelper.pause();
- if (!mGetContent) {
- mActivity.getGalleryActionBar().disableAlbumModeMenu(true);
- }
if (mSyncTask != null) {
mSyncTask.cancel();
@@ -511,10 +564,18 @@
private void initializeViews() {
mSelectionManager = new SelectionManager(mActivity, false);
mSelectionManager.setSelectionListener(this);
- Config.AlbumPage config = Config.AlbumPage.get(mActivity);
- mSlotView = new SlotView(mActivity, config.slotViewSpec);
- mAlbumView = new AlbumSlotRenderer(mActivity, mSlotView,
- mSelectionManager, config.placeholderColor);
+ mConfig = Config.AlbumPage.get(mActivity);
+ mConfigList = Config.AlbumPageList.get(mActivity);
+ if (mViewType) {
+ mSlotView = new SlotView(mActivity, mConfig.slotViewSpec);
+ mAlbumView = new AlbumSlotRenderer(mActivity, mSlotView,
+ mConfig.labelSpec, mSelectionManager, mConfig.placeholderColor, mViewType);
+ } else {
+ mSlotView = new SlotView(mActivity, mConfigList.slotViewSpec);
+ mAlbumView = new AlbumSlotRenderer(mActivity, mSlotView,
+ mConfigList.labelSpec, mSelectionManager,
+ mConfig.placeholderColor, mViewType);
+ }
mSlotView.setSlotRenderer(mAlbumView);
mRootPane.addComponent(mSlotView);
mSlotView.setListener(new SlotView.SimpleListener() {
@@ -583,26 +644,27 @@
@Override
protected boolean onCreateActionBar(Menu menu) {
- GalleryActionBar actionBar = mActivity.getGalleryActionBar();
+ //GalleryActionBar actionBar = mActivity.getGalleryActionBar();
MenuInflater inflator = getSupportMenuInflater();
if (mGetContent) {
inflator.inflate(R.menu.pickup, menu);
int typeBits = mData.getInt(GalleryActivity.KEY_TYPE_BITS,
DataManager.INCLUDE_IMAGE);
- actionBar.setTitle(GalleryUtils.getSelectionModePrompt(typeBits));
+ mActionBar.setTitle(GalleryUtils.getSelectionModePrompt(typeBits));
} else {
inflator.inflate(R.menu.album, menu);
- actionBar.setTitle(mMediaSet.getName());
+ mActionBar.setTitle(mMediaSet.getName());
- FilterUtils.setupMenuItems(actionBar, mMediaSetPath, true);
+ FilterUtils.setupMenuItems(mActionBar, mMediaSetPath, true);
- menu.findItem(R.id.action_group_by).setVisible(mShowClusterMenu);
menu.findItem(R.id.action_camera).setVisible(
- MediaSetUtils.isCameraSource(mMediaSetPath)
- && GalleryUtils.isCameraAvailable(mActivity));
+ GalleryUtils.isAnyCameraAvailable(mActivity));
+ menu.findItem(R.id.action_slideshow).setVisible(!mIsVideoScreen);
+ MenuItem item = menu.findItem(R.id.action_view_type);
+ updateMenuTitle(item);
}
- actionBar.setSubtitle(null);
+ //actionBar.setSubtitle(null);
return true;
}
@@ -650,10 +712,6 @@
mSelectionManager.setAutoLeaveSelectionMode(false);
mSelectionManager.enterSelectionMode();
return true;
- case R.id.action_group_by: {
- mActivity.getGalleryActionBar().showClusterDialog(this);
- return true;
- }
case R.id.action_slideshow: {
mInCameraAndWantQuitOnPause = false;
Bundle data = new Bundle();
@@ -676,6 +734,10 @@
GalleryUtils.startCameraActivity(mActivity);
return true;
}
+ case R.id.action_view_type: {
+ switchView();
+ return true;
+ }
default:
return false;
}
@@ -793,12 +855,24 @@
mLoadingBits &= ~loadTaskBit;
if (mLoadingBits == 0 && mIsActive) {
if (mAlbumDataAdapter.size() == 0) {
+ if (mIsVideoScreen)
+ {
+ mShowedEmptyToastForSelf = true;
+ showEmptyAlbumToast(Toast.LENGTH_LONG);
+ }
+ else {
Intent result = new Intent();
result.putExtra(KEY_EMPTY_ALBUM, true);
setStateResult(Activity.RESULT_OK, result);
mActivity.getStateManager().finishState(this);
+ }
+ return;
}
}
+ if (mShowedEmptyToastForSelf && mIsVideoScreen) {
+ mShowedEmptyToastForSelf = false;
+ hideEmptyAlbumToast();
+ }
}
private class MyLoadingListener implements LoadingListener {
@@ -850,4 +924,50 @@
switchToFilmstrip();
}
}
+
+ public void updateMenuTitle(MenuItem item) {
+
+ item.setTitle(mViewType ? R.string.action_viewtype_list
+ : R.string.action_viewtype_grid);
+ }
+
+ private void switchView() {
+ if (mViewType) {
+ mCurrentView = LIST_VIEW;
+ GalleryUtils.setIntPref(mActivity, PREF_VIEWTYPE, mCurrentView);
+ mActivity.getStateManager().switchState(this,
+ AlbumListViewPage.class, mData);
+ } else {
+ mCurrentView = GRID_VIEW;
+ GalleryUtils.setIntPref(mActivity, PREF_VIEWTYPE, mCurrentView);
+ mActivity.getStateManager().switchState(this, AlbumPage.class,
+ mData);
+ }
+
+ }
+
+
+
+ private void showEmptyAlbumToast(int toastLength) {
+ tvEmptyAlbum = new TextView(mActivity);
+ tvEmptyAlbum.setText(R.string.tvEmptyVideos);
+ tvEmptyAlbum.setTextColor(Color.parseColor("#8A000000"));
+ tvEmptyAlbum.setGravity(Gravity.CENTER);
+ tvEmptyAlbum.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
+ RelativeLayout galleryRoot = (RelativeLayout) ((Activity) mActivity)
+ .findViewById(R.id.gallery_root);
+ RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
+ RelativeLayout.LayoutParams.WRAP_CONTENT,
+ RelativeLayout.LayoutParams.WRAP_CONTENT);
+ lp.addRule(RelativeLayout.CENTER_IN_PARENT);
+ galleryRoot.addView(tvEmptyAlbum, lp);
+ }
+
+ private void hideEmptyAlbumToast() {
+
+ if (tvEmptyAlbum != null)
+ {
+ tvEmptyAlbum.setVisibility(View.GONE);
+ }
+ }
}
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java
index 068ac33..d2cc0ca 100644
--- a/src/com/android/gallery3d/app/AlbumSetPage.java
+++ b/src/com/android/gallery3d/app/AlbumSetPage.java
@@ -22,11 +22,14 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
+import android.graphics.Color;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.util.TypedValue;
+import android.view.Gravity;
import android.view.HapticFeedbackConstants;
import android.view.Menu;
import android.view.MenuInflater;
@@ -35,6 +38,7 @@
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RelativeLayout;
+import android.widget.TextView;
import android.widget.Toast;
import com.android.gallery3d.R;
@@ -122,6 +126,7 @@
private Button mCameraButton;
private boolean mShowedEmptyToastForSelf = false;
+ private TextView tvEmptyAlbum;
@Override
protected int getBackgroundColorId() {
@@ -136,17 +141,38 @@
boolean changed, int left, int top, int right, int bottom) {
mEyePosition.resetPosition();
- int slotViewTop = mActionBar.getHeight() + mConfig.paddingTop;
- int slotViewBottom = bottom - top - mConfig.paddingBottom;
- int slotViewRight = right - left;
+ int paddingLeft;
+ int paddingBottom;
+ int paddingRight;
+ int paddingTop;
+
+ if (right - left > bottom - top) {
+ paddingTop = mConfig.paddingTopLand;
+ paddingBottom = mConfig.paddingBottomLand;
+ paddingRight = mConfig.paddingRightLand;
+ paddingLeft = mConfig.paddingLeftLand;
+ }
+ else
+ {
+ paddingTop = mConfig.paddingTop;
+ paddingBottom = mConfig.paddingBottom;
+ paddingRight = mConfig.paddingRight;
+ paddingLeft = mConfig.paddingLeft;
+ }
+
+ int slotViewTop = mActionBar.getHeight() + paddingTop;
+ int slotViewBottom = bottom - top - paddingBottom;
+ int slotViewRight = right - left - paddingRight;
+ int slotViewLeft = paddingLeft ;
+
if (mShowDetails) {
- mDetailsHelper.layout(left, slotViewTop, right, bottom);
+ mDetailsHelper.layout(slotViewLeft, slotViewTop, slotViewRight, slotViewBottom);
} else {
mAlbumSetView.setHighlightItemPath(null);
}
- mSlotView.layout(0, slotViewTop, slotViewRight, slotViewBottom);
+ mSlotView.layout(slotViewLeft, slotViewTop, slotViewRight, slotViewBottom);
}
@Override
@@ -218,23 +244,24 @@
WeakReference<Toast> mEmptyAlbumToast = null;
private void showEmptyAlbumToast(int toastLength) {
- Toast toast;
- if (mEmptyAlbumToast != null) {
- toast = mEmptyAlbumToast.get();
- if (toast != null) {
- toast.show();
- return;
- }
- }
- toast = Toast.makeText(mActivity, R.string.empty_album, toastLength);
- mEmptyAlbumToast = new WeakReference<Toast>(toast);
- toast.show();
+ tvEmptyAlbum = new TextView(mActivity);
+ tvEmptyAlbum.setText(R.string.tvEmptyAlbum);
+ tvEmptyAlbum.setTextColor(Color.parseColor("#8A000000"));
+ tvEmptyAlbum.setGravity(Gravity.CENTER);
+ tvEmptyAlbum.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
+ RelativeLayout galleryRoot = (RelativeLayout) ((Activity) mActivity)
+ .findViewById(R.id.gallery_root);
+ RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
+ RelativeLayout.LayoutParams.WRAP_CONTENT,
+ RelativeLayout.LayoutParams.WRAP_CONTENT);
+ lp.addRule(RelativeLayout.CENTER_IN_PARENT);
+ galleryRoot.addView(tvEmptyAlbum, lp);
}
private void hideEmptyAlbumToast() {
- if (mEmptyAlbumToast != null) {
- Toast toast = mEmptyAlbumToast.get();
- if (toast != null) toast.cancel();
+ if (tvEmptyAlbum != null)
+ {
+ tvEmptyAlbum.setVisibility(View.GONE);
}
}
@@ -272,10 +299,10 @@
data.putInt(PhotoPage.KEY_INDEX_HINT, 0);
data.putString(PhotoPage.KEY_MEDIA_SET_PATH,
mediaPath);
- data.putBoolean(PhotoPage.KEY_START_IN_FILMSTRIP, true);
+ data.putBoolean(PhotoPage.KEY_START_IN_FILMSTRIP, false);
data.putBoolean(PhotoPage.KEY_IN_CAMERA_ROLL, targetSet.isCameraRoll());
mActivity.getStateManager().startStateForResult(
- FilmstripPage.class, AlbumPage.REQUEST_PHOTO, data);
+ SinglePhotoPage.class, AlbumPage.REQUEST_PHOTO, data);
return;
}
data.putString(AlbumPage.KEY_MEDIA_PATH, mediaPath);
@@ -333,9 +360,8 @@
mEyePosition = new EyePosition(context, this);
mDetailsSource = new MyDetailsSource();
mActionBar = mActivity.getGalleryActionBar();
- mSelectedAction = data.getInt(AlbumSetPage.KEY_SELECTED_CLUSTER_TYPE,
- FilterUtils.CLUSTER_BY_ALBUM);
-
+ //mSelectedAction = data.getInt(AlbumSetPage.KEY_SELECTED_CLUSTER_TYPE,
+ // FilterUtils.CLUSTER_BY_ALBUM);
mHandler = new SynchronizedHandler(mActivity.getGLRoot()) {
@Override
public void handleMessage(Message message) {
@@ -447,7 +473,7 @@
// Call disableClusterMenu to avoid receiving callback after paused.
// Don't hide menu here otherwise the list menu will disappear earlier than
// the action bar, which is janky and unwanted behavior.
- mActionBar.disableClusterMenu(false);
+ //mActionBar.disableClusterMenu(false);
if (mSyncTask != null) {
mSyncTask.cancel();
mSyncTask = null;
@@ -468,9 +494,9 @@
mAlbumSetView.resume();
mEyePosition.resume();
mActionModeHandler.resume();
- if (mShowClusterMenu) {
+ /*if (mShowClusterMenu) {
mActionBar.enableClusterMenu(mSelectedAction, this);
- }
+ }*/
if (!mInitialSynced) {
setLoadingBit(BIT_LOADING_SYNC);
mSyncTask = mMediaSet.requestSync(AlbumSetPage.this);
@@ -547,21 +573,21 @@
inflater.inflate(R.menu.albumset, menu);
boolean wasShowingClusterMenu = mShowClusterMenu;
mShowClusterMenu = !inAlbum;
- if (mShowClusterMenu != wasShowingClusterMenu) {
+ /*if (mShowClusterMenu != wasShowingClusterMenu) {
if (mShowClusterMenu) {
mActionBar.enableClusterMenu(mSelectedAction, this);
} else {
mActionBar.disableClusterMenu(true);
}
- }
- boolean selectAlbums = !inAlbum &&
- mActionBar.getClusterTypeAction() == FilterUtils.CLUSTER_BY_ALBUM;
+ }*/
+ boolean selectAlbums = !inAlbum ;// &&
+ // mActionBar.getClusterTypeAction() == FilterUtils.CLUSTER_BY_ALBUM;
MenuItem selectItem = menu.findItem(R.id.action_select);
selectItem.setTitle(activity.getString(
selectAlbums ? R.string.select_album : R.string.select_group));
MenuItem cameraItem = menu.findItem(R.id.action_camera);
- cameraItem.setVisible(GalleryUtils.isCameraAvailable(activity));
+ cameraItem.setVisible(GalleryUtils.isAnyCameraAvailable(activity));
FilterUtils.setupMenuItems(mActionBar, mMediaSet.getPath(), false);
@@ -574,10 +600,7 @@
MenuItem moreItem = menu.findItem(R.id.action_more_image);
moreItem.setVisible(mActivity.getResources().getBoolean(
R.bool.config_show_more_images));
-
-
- mActionBar.setTitle(mTitle);
- mActionBar.setSubtitle(mSubtitle);
+ mActionBar.setTitle(R.string.albums_title);
}
return true;
}
@@ -649,7 +672,7 @@
}
}
- private String getSelectedString() {
+ /*private String getSelectedString() {
int count = mSelectionManager.getSelectedCount();
int action = mActionBar.getClusterTypeAction();
int string = action == FilterUtils.CLUSTER_BY_ALBUM
@@ -657,22 +680,24 @@
: R.plurals.number_of_groups_selected;
String format = mActivity.getResources().getQuantityString(string, count);
return String.format(format, count);
- }
+ }*/
@Override
public void onSelectionModeChange(int mode) {
switch (mode) {
case SelectionManager.ENTER_SELECTION_MODE: {
- mActionBar.disableClusterMenu(true);
+ //mActionBar.disableClusterMenu(true);
mActionModeHandler.startActionMode();
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
+ ((GalleryActivity)mActivity).toggleNavDrawer(false);
break;
}
case SelectionManager.LEAVE_SELECTION_MODE: {
mActionModeHandler.finishActionMode();
- if (mShowClusterMenu) {
+ ((GalleryActivity)mActivity).toggleNavDrawer(true);
+ /*if (mShowClusterMenu) {
mActionBar.enableClusterMenu(mSelectedAction, this);
- }
+ }*/
mRootPane.invalidate();
break;
}
@@ -686,7 +711,7 @@
@Override
public void onSelectionChange(Path path, boolean selected) {
- mActionModeHandler.setTitle(getSelectedString());
+// mActionModeHandler.setTitle(getSelectedString());
mActionModeHandler.updateSupportedOperation(path, selected);
}
diff --git a/src/com/android/gallery3d/app/Config.java b/src/com/android/gallery3d/app/Config.java
index 7183acc..8e8d11b 100644
--- a/src/com/android/gallery3d/app/Config.java
+++ b/src/com/android/gallery3d/app/Config.java
@@ -21,7 +21,10 @@
import com.android.gallery3d.R;
import com.android.gallery3d.ui.AlbumSetSlotRenderer;
+import com.android.gallery3d.ui.AlbumSlotRenderer;
import com.android.gallery3d.ui.SlotView;
+import com.android.gallery3d.ui.TimeLineSlotRenderer;
+import com.android.gallery3d.ui.TimeLineSlotView;
final class Config {
public static class AlbumSetPage {
@@ -32,6 +35,12 @@
public int paddingTop;
public int paddingBottom;
public int placeholderColor;
+ public int paddingLeft;
+ public int paddingRight;
+ public int paddingTopLand;
+ public int paddingBottomLand;
+ public int paddingLeftLand;
+ public int paddingRightLand;
public static synchronized AlbumSetPage get(Context context) {
if (sInstance == null) {
@@ -46,21 +55,34 @@
placeholderColor = r.getColor(R.color.albumset_placeholder);
slotViewSpec = new SlotView.Spec();
- slotViewSpec.rowsLand = r.getInteger(R.integer.albumset_rows_land);
- slotViewSpec.rowsPort = r.getInteger(R.integer.albumset_rows_port);
+ //slotViewSpec.rowsLand = r.getInteger(R.integer.albumset_rows_land);
+ //slotViewSpec.rowsPort = r.getInteger(R.integer.albumset_rows_port);
+ slotViewSpec.colsLand = r.getInteger(R.integer.albumset_cols_land);
+ slotViewSpec.colsPort = r.getInteger(R.integer.albumset_cols_port);
slotViewSpec.slotGap = r.getDimensionPixelSize(R.dimen.albumset_slot_gap);
+ slotViewSpec.slotGapLand = r.getDimensionPixelSize(R.dimen.albumset_slot_gap_land);
slotViewSpec.slotHeightAdditional = 0;
+ slotViewSpec.slotWidth = r.getDimensionPixelSize(R.dimen.slot_width);
+ slotViewSpec.slotHeight = r.getDimensionPixelSize(R.dimen.slot_height);
paddingTop = r.getDimensionPixelSize(R.dimen.albumset_padding_top);
paddingBottom = r.getDimensionPixelSize(R.dimen.albumset_padding_bottom);
+ paddingLeft = r.getDimensionPixelSize(R.dimen.albumset_padding_left);
+ paddingRight = r.getDimensionPixelSize(R.dimen.albumset_padding_right);
+
+ paddingTopLand = r.getDimensionPixelSize(R.dimen.albumset_padding_top_land);
+ paddingBottomLand = r.getDimensionPixelSize(R.dimen.albumset_padding_bottom_land);
+
+ paddingLeftLand = r.getDimensionPixelSize(R.dimen.albumset_padding_left_land);
+ paddingRightLand = r.getDimensionPixelSize(R.dimen.albumset_padding_right_land);
labelSpec = new AlbumSetSlotRenderer.LabelSpec();
labelSpec.labelBackgroundHeight = r.getDimensionPixelSize(
R.dimen.albumset_label_background_height);
- labelSpec.titleOffset = r.getDimensionPixelSize(
+ /*labelSpec.titleOffset = r.getDimensionPixelSize(
R.dimen.albumset_title_offset);
labelSpec.countOffset = r.getDimensionPixelSize(
- R.dimen.albumset_count_offset);
+ R.dimen.albumset_count_offset);*/
labelSpec.titleFontSize = r.getDimensionPixelSize(
R.dimen.albumset_title_font_size);
labelSpec.countFontSize = r.getDimensionPixelSize(
@@ -69,8 +91,12 @@
R.dimen.albumset_left_margin);
labelSpec.titleRightMargin = r.getDimensionPixelSize(
R.dimen.albumset_title_right_margin);
- labelSpec.iconSize = r.getDimensionPixelSize(
- R.dimen.albumset_icon_size);
+ labelSpec.titleLeftMargin = r.getDimensionPixelSize(
+ R.dimen.albumset_title_left_margin);
+ labelSpec.countRightMargin = r.getDimensionPixelSize(
+ R.dimen.albumset_count_right_margin);
+ /*labelSpec.iconSize = r.getDimensionPixelSize(
+ R.dimen.albumset_icon_size);*/
labelSpec.backgroundColor = r.getColor(
R.color.albumset_label_background);
labelSpec.titleColor = r.getColor(R.color.albumset_label_title);
@@ -80,9 +106,17 @@
public static class AlbumPage {
private static AlbumPage sInstance;
-
+ public AlbumSlotRenderer.LabelSpec labelSpec;
public SlotView.Spec slotViewSpec;
public int placeholderColor;
+ public int paddingTop;
+ public int paddingBottom;
+ public int paddingLeft;
+ public int paddingRight;
+ public int paddingTopLand;
+ public int paddingBottomLand;
+ public int paddingLeftLand;
+ public int paddingRightLand;
public static synchronized AlbumPage get(Context context) {
if (sInstance == null) {
@@ -97,9 +131,26 @@
placeholderColor = r.getColor(R.color.album_placeholder);
slotViewSpec = new SlotView.Spec();
- slotViewSpec.rowsLand = r.getInteger(R.integer.album_rows_land);
- slotViewSpec.rowsPort = r.getInteger(R.integer.album_rows_port);
+ //slotViewSpec.rowsLand = r.getInteger(R.integer.album_rows_land);
+ //slotViewSpec.rowsPort = r.getInteger(R.integer.album_rows_port);
+ slotViewSpec.colsLand = r.getInteger(R.integer.album_cols_land);
+ slotViewSpec.colsPort = r.getInteger(R.integer.album_cols_port);
+ slotViewSpec.slotWidth = r.getDimensionPixelSize(R.dimen.slot_width_album);
+ slotViewSpec.slotHeight = r.getDimensionPixelSize(R.dimen.slot_height_album);
slotViewSpec.slotGap = r.getDimensionPixelSize(R.dimen.album_slot_gap);
+ slotViewSpec.slotGapLand = r.getDimensionPixelSize(R.dimen.album_slot_gap_land);
+
+ paddingTop = r.getDimensionPixelSize(R.dimen.album_padding_top);
+ paddingBottom = r.getDimensionPixelSize(R.dimen.album_padding_bottom);
+
+ paddingLeft = r.getDimensionPixelSize(R.dimen.album_padding_left);
+ paddingRight = r.getDimensionPixelSize(R.dimen.album_padding_right);
+
+ paddingTopLand = r.getDimensionPixelSize(R.dimen.album_padding_top_land);
+ paddingBottomLand = r.getDimensionPixelSize(R.dimen.album_padding_bottom_land);
+
+ paddingLeftLand = r.getDimensionPixelSize(R.dimen.album_padding_left_land);
+ paddingRightLand = r.getDimensionPixelSize(R.dimen.album_padding_right_land);
}
}
@@ -123,5 +174,95 @@
cachePinMargin = r.getDimensionPixelSize(R.dimen.cache_pin_margin);
}
}
+
+ public static class AlbumPageList {
+ private static AlbumPageList sInstance;
+
+ public SlotView.Spec slotViewSpec;
+ public AlbumSlotRenderer.LabelSpec labelSpec;
+ public int paddingTop;
+ public int paddingBottom;
+ public int paddingLeft;
+ public int paddingRight;
+ public int placeholderColor;
+
+ public static synchronized AlbumPageList get(Context context) {
+ if (sInstance == null) {
+ sInstance = new AlbumPageList(context);
+ }
+ return sInstance;
+ }
+
+ private AlbumPageList(Context context) {
+ Resources r = context.getResources();
+
+ placeholderColor = r.getColor(R.color.album_placeholder);
+
+ slotViewSpec = new SlotView.Spec();
+ slotViewSpec.slotHeight = r
+ .getDimensionPixelSize(R.dimen.slot_height_albumlist);
+ slotViewSpec.slotGap = r
+ .getDimensionPixelSize(R.dimen.albumlist_slot_gap);
+ slotViewSpec.slotGapLand = r
+ .getDimensionPixelSize(R.dimen.albumlist_slot_gap);
+ paddingTop = r.getDimensionPixelSize(R.dimen.albumlist_padding_top);
+ paddingBottom = r
+ .getDimensionPixelSize(R.dimen.album_padding_bottom);
+
+ paddingLeft = r.getDimensionPixelSize(R.dimen.albumlist_left_margin);
+ paddingRight = r.getDimensionPixelSize(R.dimen.album_padding_right);
+ labelSpec = new AlbumSlotRenderer.LabelSpec();
+ labelSpec.labelBackgroundHeight = r
+ .getDimensionPixelSize(R.dimen.albumlist_label_background_height);
+ labelSpec.titleFontSize = r
+ .getDimensionPixelSize(R.dimen.albumset_title_font_size);
+ labelSpec.leftMargin = r
+ .getDimensionPixelSize(R.dimen.albumlist_left_margin);
+ labelSpec.titleLeftMargin = r
+ .getDimensionPixelSize(R.dimen.albumlist_title_margin);
+ labelSpec.iconSize = r
+ .getDimensionPixelSize(R.dimen.albumlist_thumb_size);
+ labelSpec.backgroundColor = r
+ .getColor(R.color.albumset_label_background);
+ labelSpec.titleColor = r.getColor(R.color.albumlist_label_title);
+ }
+ }
+
+ public static class TimeLinePage {
+ private static TimeLinePage sInstance;
+
+ public TimeLineSlotView.Spec slotViewSpec;
+ public TimeLineSlotRenderer.LabelSpec labelSpec;
+ public int placeholderColor;
+
+ public static synchronized TimeLinePage get(Context context) {
+ if (sInstance == null) {
+ sInstance = new TimeLinePage(context);
+ }
+ return sInstance;
+ }
+ private TimeLinePage(Context context) {
+ Resources r = context.getResources();
+
+ placeholderColor = r.getColor(R.color.album_placeholder);
+
+ slotViewSpec = new TimeLineSlotView.Spec();
+ slotViewSpec.colsLand = r.getInteger(R.integer.album_cols_land);
+ slotViewSpec.colsPort = r.getInteger(R.integer.album_cols_port);
+ slotViewSpec.slotGapPort = r.getDimensionPixelSize(R.dimen.timeline_port_slot_gap);
+ slotViewSpec.slotGapLand = r.getDimensionPixelSize(R.dimen.timeline_land_slot_gap);
+ slotViewSpec.titleHeight = r.getDimensionPixelSize(R.dimen.timeline_title_height);
+
+ labelSpec = new TimeLineSlotRenderer.LabelSpec();
+
+ labelSpec.timeLineTitleHeight = r.getDimensionPixelSize(
+ R.dimen.timeline_title_height);
+ labelSpec.timeLineTitleFontSize = r.getDimensionPixelSize(
+ R.dimen.timeline_title_font_size);
+ labelSpec.timeLineTitleTextColor = r.getColor(R.color.timeline_title_text_color);
+ labelSpec.timeLineNumberTextColor = r.getColor(R.color.timeline_title_number_text_color);
+ labelSpec.timeLineTitleBackgroundColor = r.getColor(R.color.timeline_title_background_color);
+ }
+ }
}
diff --git a/src/com/android/gallery3d/app/FilterUtils.java b/src/com/android/gallery3d/app/FilterUtils.java
index bc28a9c..3e05535 100644
--- a/src/com/android/gallery3d/app/FilterUtils.java
+++ b/src/com/android/gallery3d/app/FilterUtils.java
@@ -63,6 +63,7 @@
public static final int CLUSTER_BY_TAG = 8;
public static final int CLUSTER_BY_SIZE = 16;
public static final int CLUSTER_BY_FACE = 32;
+ public static final int CLUSTER_BY_VIDEOS = 64;
public static final int FILTER_IMAGE_ONLY = 1;
public static final int FILTER_VIDEO_ONLY = 2;
@@ -95,7 +96,7 @@
setMenuItemApplied(actionBar, CLUSTER_BY_FACE,
(ctype & CLUSTER_BY_FACE) != 0, (ccurrent & CLUSTER_BY_FACE) != 0);
- actionBar.setClusterItemVisibility(CLUSTER_BY_ALBUM, !inAlbum || ctype == 0);
+// actionBar.setClusterItemVisibility(CLUSTER_BY_ALBUM, !inAlbum || ctype == 0);
setMenuItemApplied(actionBar, R.id.action_cluster_album, ctype == 0,
ccurrent == 0);
@@ -165,11 +166,11 @@
private static void setMenuItemApplied(
GalleryActionBar model, int id, boolean applied, boolean updateTitle) {
- model.setClusterItemEnabled(id, !applied);
+// model.setClusterItemEnabled(id, !applied);
}
private static void setMenuItemAppliedEnabled(GalleryActionBar model, int id, boolean applied, boolean enabled, boolean updateTitle) {
- model.setClusterItemEnabled(id, enabled);
+// model.setClusterItemEnabled(id, enabled);
}
// Add a specified filter to the path.
@@ -208,6 +209,8 @@
case CLUSTER_BY_FACE:
kind = "face";
break;
+ case CLUSTER_BY_VIDEOS:
+ return "/local/video/-1";
default: /* CLUSTER_BY_ALBUM */
return base;
}
diff --git a/src/com/android/gallery3d/app/GalleryActionBar.java b/src/com/android/gallery3d/app/GalleryActionBar.java
index 588f584..1e84587 100644
--- a/src/com/android/gallery3d/app/GalleryActionBar.java
+++ b/src/com/android/gallery3d/app/GalleryActionBar.java
@@ -26,6 +26,8 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -34,6 +36,7 @@
import android.widget.BaseAdapter;
import android.widget.ShareActionProvider;
import android.widget.TextView;
+import android.widget.Toolbar;
import android.widget.TwoLineListItem;
import com.android.gallery3d.R;
@@ -41,7 +44,7 @@
import java.util.ArrayList;
-public class GalleryActionBar implements OnNavigationListener {
+public class GalleryActionBar {
@SuppressWarnings("unused")
private static final String TAG = "GalleryActionBar";
@@ -53,9 +56,9 @@
private AbstractGalleryActivity mActivity;
private ActionBar mActionBar;
private int mCurrentIndex;
- private ClusterAdapter mAdapter = new ClusterAdapter();
+// private ClusterAdapter mAdapter = new ClusterAdapter();
- private AlbumModeAdapter mAlbumModeAdapter;
+// private AlbumModeAdapter mAlbumModeAdapter;
private OnAlbumModeSelectedListener mAlbumModeListener;
private int mLastAlbumModeSelected;
private CharSequence [] mAlbumModes;
@@ -107,7 +110,7 @@
R.string.group_by_tags)
};
- private class ClusterAdapter extends BaseAdapter {
+ /*private class ClusterAdapter extends BaseAdapter {
@Override
public int getCount() {
@@ -134,9 +137,9 @@
view.setText(sClusterItems[position].spinnerTitle);
return convertView;
}
- }
+ }*/
- private class AlbumModeAdapter extends BaseAdapter {
+ /*private class AlbumModeAdapter extends BaseAdapter {
@Override
public int getCount() {
return mAlbumModes.length;
@@ -174,7 +177,7 @@
view.setText((CharSequence) getItem(position));
return convertView;
}
- }
+ }*/
public static String getClusterByTypeString(Context context, int type) {
for (ActionItem item : sClusterItems) {
@@ -210,104 +213,105 @@
return mActionBar != null ? mActionBar.getHeight() : 0;
}
- public void setClusterItemEnabled(int id, boolean enabled) {
- for (ActionItem item : sClusterItems) {
- if (item.action == id) {
- item.enabled = enabled;
- return;
- }
- }
- }
+// public void setClusterItemEnabled(int id, boolean enabled) {
+// for (ActionItem item : sClusterItems) {
+// if (item.action == id) {
+// item.enabled = enabled;
+// return;
+// }
+// }
+// }
- public void setClusterItemVisibility(int id, boolean visible) {
- for (ActionItem item : sClusterItems) {
- if (item.action == id) {
- item.visible = visible;
- return;
- }
- }
- }
+// public void setClusterItemVisibility(int id, boolean visible) {
+// for (ActionItem item : sClusterItems) {
+// if (item.action == id) {
+// item.visible = visible;
+// return;
+// }
+// }
+// }
- public int getClusterTypeAction() {
- return sClusterItems[mCurrentIndex].action;
- }
+// public int getClusterTypeAction() {
+// return sClusterItems[mCurrentIndex].action;
+// }
- public void enableClusterMenu(int action, ClusterRunner runner) {
- if (mActionBar != null) {
- // Don't set cluster runner until action bar is ready.
- mClusterRunner = null;
- mActionBar.setListNavigationCallbacks(mAdapter, this);
- mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
- setSelectedAction(action);
- mClusterRunner = runner;
- }
- }
+// public void enableClusterMenu(int action, ClusterRunner runner) {
+// if (mActionBar != null) {
+// // Don't set cluster runner until action bar is ready.
+// mClusterRunner = null;
+//// mActionBar.setListNavigationCallbacks(mAdapter, this);
+// mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
+// setSelectedAction(action);
+// mClusterRunner = runner;
+// }
+// }
// The only use case not to hideMenu in this method is to ensure
// all elements disappear at the same time when exiting gallery.
// hideMenu should always be true in all other cases.
- public void disableClusterMenu(boolean hideMenu) {
- if (mActionBar != null) {
- mClusterRunner = null;
- if (hideMenu) {
- mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
- }
- }
- }
+// public void disableClusterMenu(boolean hideMenu) {
+// if (mActionBar != null) {
+// mClusterRunner = null;
+// if (hideMenu) {
+// mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+// }
+// }
+// }
public void onConfigurationChanged() {
if (mActionBar != null && mAlbumModeListener != null) {
- OnAlbumModeSelectedListener listener = mAlbumModeListener;
- enableAlbumModeMenu(mLastAlbumModeSelected, listener);
+// OnAlbumModeSelectedListener listener = mAlbumModeListener;
+// enableAlbumModeMenu(mLastAlbumModeSelected, listener);
+
}
}
- public void enableAlbumModeMenu(int selected, OnAlbumModeSelectedListener listener) {
- if (mActionBar != null) {
- if (mAlbumModeAdapter == null) {
- // Initialize the album mode options if they haven't been already
- Resources res = mActivity.getResources();
- mAlbumModes = new CharSequence[] {
- res.getString(R.string.switch_photo_filmstrip),
- res.getString(R.string.switch_photo_grid)};
- mAlbumModeAdapter = new AlbumModeAdapter();
- }
- mAlbumModeListener = null;
- mLastAlbumModeSelected = selected;
- mActionBar.setListNavigationCallbacks(mAlbumModeAdapter, this);
- mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
- mActionBar.setSelectedNavigationItem(selected);
- mAlbumModeListener = listener;
- }
- }
+// public void enableAlbumModeMenu(int selected, OnAlbumModeSelectedListener listener) {
+// if (mActionBar != null) {
+// if (mAlbumModeAdapter == null) {
+// // Initialize the album mode options if they haven't been already
+// Resources res = mActivity.getResources();
+// mAlbumModes = new CharSequence[] {
+// res.getString(R.string.switch_photo_filmstrip),
+// res.getString(R.string.switch_photo_grid)};
+// mAlbumModeAdapter = new AlbumModeAdapter();
+// }
+// mAlbumModeListener = null;
+// mLastAlbumModeSelected = selected;
+// mActionBar.setListNavigationCallbacks(mAlbumModeAdapter, this);
+// mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
+// mActionBar.setSelectedNavigationItem(selected);
+// mAlbumModeListener = listener;
+// }
+// }
- public void disableAlbumModeMenu(boolean hideMenu) {
- if (mActionBar != null) {
- mAlbumModeListener = null;
- if (hideMenu) {
- mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
- }
- }
- }
+// public void disableAlbumModeMenu(boolean hideMenu) {
+// if (mActionBar != null) {
+// mAlbumModeListener = null;
+// if (hideMenu) {
+// mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+// }
+// }
+// }
- public void showClusterDialog(final ClusterRunner clusterRunner) {
- createDialogData();
- final ArrayList<Integer> actions = mActions;
- new AlertDialog.Builder(mContext).setTitle(R.string.group_by).setItems(
- mTitles, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- // Need to lock rendering when operations invoked by system UI (main thread) are
- // modifying slot data used in GL thread for rendering.
- mActivity.getGLRoot().lockRenderThread();
- try {
- clusterRunner.doCluster(actions.get(which).intValue());
- } finally {
- mActivity.getGLRoot().unlockRenderThread();
- }
- }
- }).create().show();
- }
+// public void showClusterDialog(final ClusterRunner clusterRunner) {
+// createDialogData();
+// final ArrayList<Integer> actions = mActions;
+// new AlertDialog.Builder(mContext).setTitle(R.string.group_by).setItems(
+// mTitles, new DialogInterface.OnClickListener() {
+// @Override
+// public void onClick(DialogInterface dialog, int which) {
+// // Need to lock rendering when operations invoked by system UI (main thread) are
+// // modifying slot data used in GL thread for rendering.
+// mActivity.getGLRoot().lockRenderThread();
+// try {
+// clusterRunner.doCluster(actions.get(which).intValue());
+// } finally {
+// mActivity.getGLRoot().unlockRenderThread();
+// }
+// }
+// }).create().show();
+// }
@TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH)
private void setHomeButtonEnabled(boolean enabled) {
@@ -355,39 +359,39 @@
if (mActionBar != null) mActionBar.removeOnMenuVisibilityListener(listener);
}
- public boolean setSelectedAction(int type) {
- if (mActionBar == null) return false;
+// public boolean setSelectedAction(int type) {
+// if (mActionBar == null) return false;
+//
+// for (int i = 0, n = sClusterItems.length; i < n; i++) {
+// ActionItem item = sClusterItems[i];
+// if (item.action == type) {
+// mActionBar.setSelectedNavigationItem(i);
+// mCurrentIndex = i;
+// return true;
+// }
+// }
+// return false;
+// }
- for (int i = 0, n = sClusterItems.length; i < n; i++) {
- ActionItem item = sClusterItems[i];
- if (item.action == type) {
- mActionBar.setSelectedNavigationItem(i);
- mCurrentIndex = i;
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean onNavigationItemSelected(int itemPosition, long itemId) {
- if (itemPosition != mCurrentIndex && mClusterRunner != null
- || mAlbumModeListener != null) {
- // Need to lock rendering when operations invoked by system UI (main thread) are
- // modifying slot data used in GL thread for rendering.
- mActivity.getGLRoot().lockRenderThread();
- try {
- if (mAlbumModeListener != null) {
- mAlbumModeListener.onAlbumModeSelected(itemPosition);
- } else {
- mClusterRunner.doCluster(sClusterItems[itemPosition].action);
- }
- } finally {
- mActivity.getGLRoot().unlockRenderThread();
- }
- }
- return false;
- }
+// @Override
+// public boolean onNavigationItemSelected(int itemPosition, long itemId) {
+// if (itemPosition != mCurrentIndex && mClusterRunner != null
+// || mAlbumModeListener != null) {
+// // Need to lock rendering when operations invoked by system UI (main thread) are
+// // modifying slot data used in GL thread for rendering.
+// mActivity.getGLRoot().lockRenderThread();
+// try {
+// if (mAlbumModeListener != null) {
+// mAlbumModeListener.onAlbumModeSelected(itemPosition);
+// } else {
+// mClusterRunner.doCluster(sClusterItems[itemPosition].action);
+// }
+// } finally {
+// mActivity.getGLRoot().unlockRenderThread();
+// }
+// }
+// return false;
+// }
private Menu mActionBarMenu;
private ShareActionProvider mSharePanoramaActionProvider;
@@ -435,4 +439,17 @@
onShareListener);
}
}
+
+ public void setBackGroundTransparent()
+ {
+ mActionBar.setBackgroundDrawable(new ColorDrawable(Color.argb(66, 0, 0, 0)));
+
+ }
+
+ public void setBackGroundDefault()
+ {
+ mActionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#e53935")));
+ }
+
+
}
diff --git a/src/com/android/gallery3d/app/GalleryActivity.java b/src/com/android/gallery3d/app/GalleryActivity.java
index 4071a08..d7ee8fc 100644
--- a/src/com/android/gallery3d/app/GalleryActivity.java
+++ b/src/com/android/gallery3d/app/GalleryActivity.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution
+ *
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +20,7 @@
package com.android.gallery3d.app;
import java.util.Locale;
-
+import android.os.Handler;
import android.app.Dialog;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -36,13 +39,30 @@
import android.provider.MediaStore;
import android.text.TextUtils;
import android.util.Log;
+import android.view.Gravity;
import android.view.InputDevice;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
+import android.view.View.OnClickListener;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
import android.widget.Toast;
+import android.widget.Toolbar;
+import android.widget.Toolbar.OnMenuItemClickListener;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v4.widget.DrawerLayout.DrawerListener;
+import android.text.TextUtils;
+import java.util.ArrayList;
import com.android.gallery3d.R;
import com.android.gallery3d.common.Utils;
import com.android.gallery3d.data.DataManager;
@@ -74,19 +94,24 @@
private static final String TAG = "GalleryActivity";
private Dialog mVersionCheckDialog;
+ private ListView mDrawerListView;
+ private DrawerLayout mDrawerLayout;
+ public static boolean mIsparentActivityFInishing;
+ NavigationDrawerListAdapter mNavigationAdapter;
+ public Toolbar mToolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- requestWindowFeature(Window.FEATURE_ACTION_BAR);
- requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
+ requestWindowFeature(Window.FEATURE_NO_TITLE);
if (getIntent().getBooleanExtra(KEY_DISMISS_KEYGUARD, false)) {
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
}
- setContentView(R.layout.main);
+ setContentView(R.layout.gallery_main);
+ initView();
if (savedInstanceState != null) {
getStateManager().restoreFromState(savedInstanceState);
@@ -99,6 +124,208 @@
startBulkMpoProcess();
}
+ private static class ActionItem {
+ public int action;
+ public int title;
+ public int icon;
+
+ public ActionItem(int action, int title, int icon) {
+ this.action = action;
+ this.title = title;
+ this.icon = icon;
+ }
+ }
+
+ private static final ActionItem[] sActionItems = new ActionItem[] {
+ new ActionItem(FilterUtils.CLUSTER_BY_TIME,
+ R.string.timeline_title, R.drawable.timeline),
+ new ActionItem(FilterUtils.CLUSTER_BY_ALBUM, R.string.albums_title,
+ R.drawable.albums),
+ new ActionItem(FilterUtils.CLUSTER_BY_VIDEOS,
+ R.string.videos_title, R.drawable.videos) };
+
+ public void initView() {
+ mDrawerListView = (ListView) findViewById(R.id.navList);
+ mNavigationAdapter = new NavigationDrawerListAdapter(this);
+ mDrawerListView.setAdapter(mNavigationAdapter);
+ mToolbar = (Toolbar) findViewById(R.id.toolbar);
+ setActionBar(mToolbar);
+
+ mDrawerListView
+ .setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view,
+ int position, long id) {
+ getGLRoot().lockRenderThread();
+ showScreen(position);
+
+ mNavigationAdapter.setClickPosition(position);
+ mDrawerListView.invalidateViews();
+ mDrawerLayout.closeDrawer(Gravity.LEFT);
+ getGLRoot().unlockRenderThread();
+ }
+ });
+ mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ mDrawerLayout.setDrawerListener(new DrawerListener() {
+
+ @Override
+ public void onDrawerStateChanged(int arg0) {
+ if (getStateManager().getStateCount() == 1)
+ {
+ mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
+ } else {
+ mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
+ }
+ }
+
+ @Override
+ public void onDrawerSlide(View arg0, float arg1) {
+
+ }
+
+ @Override
+ public void onDrawerOpened(View arg0) {
+
+ }
+
+ @Override
+ public void onDrawerClosed(View arg0) {
+
+ }
+ });
+ mToolbar.setNavigationContentDescription("drawer");
+ mToolbar.setNavigationOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ if (mToolbar.getNavigationContentDescription().equals("drawer")) {
+ mDrawerLayout.openDrawer(Gravity.LEFT);
+
+ } else {
+ mToolbar.setNavigationContentDescription("drawer");
+ mToolbar.setNavigationIcon(R.drawable.drawer);
+ onBackPressed();
+ }
+ }
+ });
+ setToolbar(mToolbar);
+ }
+
+ public void toggleNavDrawer(boolean setDrawerVisibility)
+ {
+ if (mDrawerLayout != null) {
+ if (setDrawerVisibility) {
+ mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
+ }
+ else {
+ mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
+ }
+ }
+ }
+
+ public void showScreen(int position) {
+ if (position > 2) {
+ position = 1;
+ }
+ // Bundle data = new Bundle();
+ // int clusterType;
+ // String newPath;
+ String basePath = getDataManager().getTopSetPath(
+ DataManager.INCLUDE_ALL);
+ switch (position) {
+
+ case 0:
+ startTimelinePage(); //Timeline view
+ break;
+ case 1:
+ startAlbumPage(); // Albums View
+ break;
+ case 2:
+ startVideoPage(); // Videos view
+ break;
+ default:
+ break;
+ }
+
+ mNavigationAdapter.setClickPosition(position);
+
+ mDrawerListView.invalidateViews();
+ mToolbar.setTitle(getResources().getStringArray(
+ R.array.title_array_nav_items)[position]);
+
+ mDrawerListView.setItemChecked(position, true);
+ mDrawerListView.setSelection(position);
+ mToolbar.setNavigationContentDescription("drawer");
+ mToolbar.setNavigationIcon(R.drawable.drawer);
+ }
+
+ private class NavigationDrawerListAdapter extends BaseAdapter {
+
+ private int curTab = 0;
+ Context mContext;
+
+ public NavigationDrawerListAdapter(Context context) {
+ mContext = context;
+
+ }
+
+ @Override
+ public int getCount() {
+ return sActionItems.length;
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return sActionItems[position];
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return 0;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View view;
+
+ if (convertView == null) {
+ LayoutInflater inflater = (LayoutInflater) mContext
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ view = inflater.inflate(
+ com.android.gallery3d.R.layout.drawer_list_item, null);
+ } else {
+ view = convertView;
+ }
+
+ TextView titleView = (TextView) view.findViewById(R.id.itemTitle);
+ ImageView iconView = (ImageView) view.findViewById(R.id.ivItem);
+
+ titleView.setText(sActionItems[position].title);
+ iconView.setImageResource(sActionItems[position].icon);
+
+ if (curTab == position) {
+ view.setBackgroundResource(R.drawable.drawer_item_selected_bg);
+ } else {
+ view.setBackgroundColor(android.R.color.transparent);
+ }
+
+ return view;
+ }
+
+ public void setClickPosition(int position) {
+ curTab = position;
+ }
+ }
+
+ public static int getActionTitle(Context context, int type) {
+ for (ActionItem item : sActionItems) {
+ if (item.action == type) {
+ return item.title;
+ }
+ }
+ return -1;
+ }
+
private void initializeByIntent() {
Intent intent = getIntent();
String action = intent.getAction();
@@ -120,16 +347,72 @@
|| ACTION_REVIEW.equalsIgnoreCase(action)){
startViewAction(intent);
} else {
- startDefaultPage();
+ startTimelinePage();
+ mToolbar.setTitle(R.string.albums_title);
}
}
- public void startDefaultPage() {
+ public void startAlbumPage() {
PicasaSource.showSignInReminder(this);
Bundle data = new Bundle();
- data.putString(AlbumSetPage.KEY_MEDIA_PATH,
- getDataManager().getTopSetPath(DataManager.INCLUDE_ALL));
- getStateManager().startState(AlbumSetPage.class, data);
+ int clusterType = FilterUtils.CLUSTER_BY_ALBUM;
+ data.putString(AlbumSetPage.KEY_MEDIA_PATH, getDataManager()
+ .getTopSetPath(DataManager.INCLUDE_ALL));
+ if (getStateManager().getStateCount() == 0)
+ getStateManager().startState(AlbumSetPage.class, data);
+ else {
+ ActivityState state = getStateManager().getTopState();
+ String oldClass = state.getClass().getSimpleName();
+ String newClass = AlbumSetPage.class.getSimpleName();
+ if (!oldClass.equals(newClass)) {
+ getStateManager().switchState(getStateManager().getTopState(),
+ AlbumSetPage.class, data);
+ }
+ }
+ mVersionCheckDialog = PicasaSource.getVersionCheckDialog(this);
+ if (mVersionCheckDialog != null) {
+ mVersionCheckDialog.setOnCancelListener(this);
+ }
+ }
+
+ private void startTimelinePage() {
+ String newBPath = getDataManager().getTopSetPath(DataManager.INCLUDE_ALL);
+ String newPath = FilterUtils.switchClusterPath(newBPath, FilterUtils.CLUSTER_BY_TIME);
+ Bundle data = new Bundle();
+ data.putString(TimeLinePage.KEY_MEDIA_PATH, newPath);
+ if (getStateManager().getStateCount() == 0)
+ getStateManager().startState(TimeLinePage.class, data);
+ else {
+ ActivityState state = getStateManager().getTopState();
+ String oldClass = state.getClass().getSimpleName();
+ String newClass = TimeLinePage.class.getSimpleName();
+ if (!oldClass.equals(newClass)) {
+ getStateManager().switchState(getStateManager().getTopState(),
+ TimeLinePage.class, data);
+ }
+ }
+ mVersionCheckDialog = PicasaSource.getVersionCheckDialog(this);
+ if (mVersionCheckDialog != null) {
+ mVersionCheckDialog.setOnCancelListener(this);
+ }
+ }
+
+ public void startVideoPage() {
+ PicasaSource.showSignInReminder(this);
+ String basePath = getDataManager().getTopSetPath(
+ DataManager.INCLUDE_ALL);
+ Bundle data = new Bundle();
+ int clusterType = FilterUtils.CLUSTER_BY_VIDEOS;
+ String newPath = FilterUtils.switchClusterPath(basePath, clusterType);
+ data.putString(AlbumPage.KEY_MEDIA_PATH, newPath);
+ data.putBoolean(AlbumPage.KEY_IS_VIDEOS_SCREEN, true);
+ ActivityState state = getStateManager().getTopState();
+ String oldClass = state.getClass().getSimpleName();
+ String newClass = AlbumPage.class.getSimpleName();
+ if (!oldClass.equals(newClass)) {
+ getStateManager().switchState(getStateManager().getTopState(),
+ AlbumPage.class, data);
+ }
mVersionCheckDialog = PicasaSource.getVersionCheckDialog(this);
if (mVersionCheckDialog != null) {
mVersionCheckDialog.setOnCancelListener(this);
@@ -224,7 +507,7 @@
getStateManager().startState(AlbumSetPage.class, data);
}
} else {
- startDefaultPage();
+ startTimelinePage();
}
} else {
Path itemPath = dm.findPathByUri(uri, contentType);
diff --git a/src/com/android/gallery3d/app/MovieActivity.java b/src/com/android/gallery3d/app/MovieActivity.java
index beab0e5..87c2242 100644
--- a/src/com/android/gallery3d/app/MovieActivity.java
+++ b/src/com/android/gallery3d/app/MovieActivity.java
@@ -37,7 +37,9 @@
import android.database.Cursor;
//import android.drm.DrmHelper;
import android.graphics.Bitmap;
+import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
import android.media.AudioManager;
import android.media.audiofx.AudioEffect;
import android.media.audiofx.AudioEffect.Descriptor;
@@ -270,6 +272,7 @@
actionBar.setDisplayOptions(
ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE,
ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE);
+ actionBar.setBackgroundDrawable(new ColorDrawable(Color.argb(66, 0, 0, 0)));
actionBar.addOnMenuVisibilityListener(new OnMenuVisibilityListener() {
@Override
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index f725056..15b70d3 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -82,7 +82,7 @@
public abstract class PhotoPage extends ActivityState implements
PhotoView.Listener, AppBridge.Server, ShareActionProvider.OnShareTargetSelectedListener,
- PhotoPageBottomControls.Delegate, GalleryActionBar.OnAlbumModeSelectedListener {
+ PhotoPageBottomControls.Delegate {
private static final String TAG = "PhotoPage";
private static final int MSG_HIDE_BARS = 1;
@@ -123,7 +123,8 @@
public static final String KEY_SHOW_WHEN_LOCKED = "show_when_locked";
public static final String KEY_IN_CAMERA_ROLL = "in_camera_roll";
public static final String KEY_READONLY = "read-only";
-
+ public static final String KEY_FROM_VIDEOS_SCREEN = "from-video-screen";
+ public static final String KEY_FROM_TIMELINE_SCREEN = "from-timeline-screen";
// Bundle key, used for checking whether it is from widget
public static final String KEY_IS_FROM_WIDGET = "is_from_widget";
@@ -178,6 +179,8 @@
private boolean mStartInFilmstrip;
private boolean mHasCameraScreennailOrPlaceholder = false;
private boolean mRecenterCameraOnResume = true;
+ private boolean mIsFromVideoScreen;
+ private boolean mIsFromTimelineScreen;
// These are only valid after the panorama callback
private boolean mIsPanorama;
@@ -202,6 +205,10 @@
private int mLastSystemUiVis = 0;
+ private ShareActionProvider mShareActionProvider;
+ private Intent mShareIntent;
+ private boolean mIsPhotoChanged = true;
+
private final PanoramaSupportCallback mUpdatePanoramaMenuItemsCallback = new PanoramaSupportCallback() {
@Override
public void panoramaInfoAvailable(MediaObject mediaObject, boolean isPanorama,
@@ -270,6 +277,7 @@
public void onCreate(Bundle data, Bundle restoreState) {
super.onCreate(data, restoreState);
mActionBar = mActivity.getGalleryActionBar();
+ mActionBar.setBackGroundTransparent();
mSelectionManager = new SelectionManager(mActivity, false);
mMenuExecutor = new MenuExecutor(mActivity, mSelectionManager);
@@ -279,6 +287,8 @@
mApplication = (GalleryApp) ((Activity) mActivity).getApplication();
mOrientationManager = mActivity.getOrientationManager();
mActivity.getGLRoot().setOrientationSource(mOrientationManager);
+ mIsFromVideoScreen = data.getBoolean(KEY_FROM_VIDEOS_SCREEN, false);
+ mIsFromTimelineScreen = data.getBoolean(KEY_FROM_TIMELINE_SCREEN, false);
mHandler = new SynchronizedHandler(mActivity.getGLRoot()) {
@Override
@@ -469,6 +479,9 @@
mSetPathString = "/filter/delete/{" + mSetPathString + "}";
mMediaSet = (FilterDeleteSet) mActivity.getDataManager()
.getMediaSet(mSetPathString);
+ if(mMediaSet != null && mIsFromTimelineScreen) {
+ mMediaSet.setClusterKind(-1);
+ }
if (mMediaSet == null) {
Log.w(TAG, "failed to restore " + mSetPathString);
}
@@ -527,6 +540,7 @@
public void onPhotoChanged(int index, Path item) {
int oldIndex = mCurrentIndex;
mCurrentIndex = index;
+ mIsPhotoChanged = true;
if (mHasCameraScreennailOrPlaceholder) {
if (mCurrentIndex > 0) {
@@ -552,7 +566,10 @@
if (!mSkipUpdateCurrentPhoto) {
if (item != null) {
MediaItem photo = mModel.getMediaItem(0);
- if (photo != null) updateCurrentPhoto(photo);
+ if (photo != null) {
+ mActionBar.setTitle(photo.getName());
+ updateCurrentPhoto(photo);
+ }
}
updateBars();
}
@@ -635,19 +652,36 @@
if (mCurrentPhoto == null) {
return false;
}
- switch(control) {
- case R.id.photopage_bottom_control_edit:
- return mHaveImageEditor && mShowBars && !mReadOnlyView
- && !mPhotoView.getFilmMode()
- && (mCurrentPhoto.getSupportedOperations() & MediaItem.SUPPORT_EDIT) != 0
- && mCurrentPhoto.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE;
- case R.id.photopage_bottom_control_panorama:
- return mIsPanorama;
- case R.id.photopage_bottom_control_tiny_planet:
- return mHaveImageEditor && mShowBars
- && mIsPanorama360 && !mPhotoView.getFilmMode();
- default:
- return false;
+ if (mIsPhotoChanged) {
+ if (mCurrentPhoto.getMediaType() == MediaObject.MEDIA_TYPE_VIDEO) {
+ mBottomControls.setSharePositionForVideo(mActivity);
+ } else {
+ mBottomControls.setSharePositionForImage();
+ }
+ mIsPhotoChanged = false;
+ }
+ switch (control) {
+ case R.id.photopage_bottom_controls:
+ return mShowBars;
+ case R.id.photopage_bottom_control_edit:
+ return mHaveImageEditor
+ && mShowBars
+ && !mReadOnlyView
+ && !mPhotoView.getFilmMode()
+ && (mCurrentPhoto.getSupportedOperations() & MediaItem.SUPPORT_EDIT) != 0
+ && mCurrentPhoto.getMediaType() == MediaObject.MEDIA_TYPE_IMAGE;
+ // case R.id.photopage_bottom_control_panorama:
+ // return mIsPanorama;
+ // case R.id.photopage_bottom_control_tiny_planet:
+ // return mHaveImageEditor && mShowBars
+ // && mIsPanorama360 && !mPhotoView.getFilmMode();
+ case R.id.photopage_bottom_control_share:
+ mShareIntent = new Intent(Intent.ACTION_SEND);
+ return mShowBars;
+ case R.id.photopage_bottom_control_delete:
+ return mShowBars;
+ default:
+ return false;
}
}
@@ -657,15 +691,39 @@
case R.id.photopage_bottom_control_edit:
launchPhotoEditor();
return;
- case R.id.photopage_bottom_control_panorama:
- mActivity.getPanoramaViewHelper()
- .showPanorama(mCurrentPhoto.getContentUri());
+ case R.id.photopage_bottom_control_share:
+ if (mModel != null && mModel.getMediaItem(0) != null) {
+ Uri uri = Uri.parse(mModel.getMediaItem(0).getFilePath());
+ mShareIntent.setType(MenuExecutor.getMimeType(mModel
+ .getMediaItem(0).getMediaType()));
+ mShareIntent.putExtra(Intent.EXTRA_STREAM, uri);
+ mActivity.startActivity(Intent.createChooser(mShareIntent,
+ "Share via"));
+ }
+ return;
+
+ case R.id.photopage_bottom_control_delete:
+ String confirmMsg = null;
+ confirmMsg = mActivity.getResources().getQuantityString(
+ R.plurals.delete_selection, 1);
+ if (mModel != null && mModel.getMediaItem(0) != null) {
+ Path path = mModel.getMediaItem(0).getPath();
+ mSelectionManager.deSelectAll();
+ mSelectionManager.toggle(path);
+ MenuItem item = null;
+ mMenuExecutor.onMenuClicked(item, confirmMsg,
+ mConfirmDialogListener);
+ }
return;
- case R.id.photopage_bottom_control_tiny_planet:
- launchTinyPlanet();
- return;
- default:
- return;
+ // case R.id.photopage_bottom_control_panorama:
+ // mActivity.getPanoramaViewHelper()
+ // .showPanorama(mCurrentPhoto.getContentUri());
+ // return;
+ // case R.id.photopage_bottom_control_tiny_planet:
+ // launchTinyPlanet();
+ // return;
+ default:
+ return;
}
}
@@ -950,6 +1008,17 @@
onUpPressed();
} else {
super.onBackPressed();
+ mActionBar.setBackGroundDefault();
+ int count = mActivity.getStateManager().getStateCount();
+ if(mIsFromTimelineScreen) {
+ mMediaSet.setClusterKind(0);
+ }
+ if (mIsFromVideoScreen || count == 1 || mIsFromTimelineScreen) {
+ mActivity.getToolbar().setNavigationContentDescription(
+ "drawer");
+ mActivity.getToolbar().setNavigationIcon(R.drawable.drawer);
+ ((GalleryActivity)mActivity).toggleNavDrawer(true);
+ }
}
}
}
@@ -1024,7 +1093,7 @@
mActionBar.createActionBarMenu(R.menu.photo, menu);
mHaveImageEditor = GalleryUtils.isEditorAvailable(mActivity, "image/*");
updateMenuOperations();
- mActionBar.setTitle(mMediaSet != null ? mMediaSet.getName() : "");
+ //mActionBar.setTitle(mMediaSet != null ? mMediaSet.getName() : "");
return true;
}
@@ -1124,7 +1193,7 @@
SlideshowPage.class, REQUEST_SLIDESHOW, data);
return true;
}
- case R.id.action_crop: {
+ /*case R.id.action_crop: {
Activity activity = mActivity;
Intent intent = new Intent(CropActivity.CROP_ACTION);
intent.setClass(activity, CropActivity.class);
@@ -1134,7 +1203,7 @@
? REQUEST_CROP_PICASA
: REQUEST_CROP);
return true;
- }
+ }*/
case R.id.action_trim: {
Intent intent = new Intent(mActivity, TrimVideo.class);
intent.setData(manager.getContentUri(path));
@@ -1160,10 +1229,10 @@
launchPhotoEditor();
return true;
}
- case R.id.action_simple_edit: {
+ /*case R.id.action_simple_edit: {
launchSimpleEditor();
return true;
- }
+ }*/
case R.id.action_details: {
if (mShowDetails) {
hideDetails();
@@ -1180,8 +1249,8 @@
confirmMsg = mActivity.getResources().getQuantityString(
R.plurals.delete_selection, 1);
case R.id.action_setas:
- case R.id.action_rotate_ccw:
- case R.id.action_rotate_cw:
+ //case R.id.action_rotate_ccw:
+ //case R.id.action_rotate_cw:
case R.id.action_show_on_map:
mSelectionManager.deSelectAll();
mSelectionManager.toggle(path);
@@ -1372,11 +1441,11 @@
case REQUEST_EDIT:
setCurrentPhotoByIntent(data);
break;
- case REQUEST_CROP:
+ /*case REQUEST_CROP:
if (resultCode == Activity.RESULT_OK) {
setCurrentPhotoByIntent(data);
}
- break;
+ break;*/
case REQUEST_CROP_PICASA: {
if (resultCode == Activity.RESULT_OK) {
Context context = mActivity.getAndroidContext();
@@ -1422,9 +1491,9 @@
mHandler.removeMessages(MSG_REFRESH_BOTTOM_CONTROLS);
refreshBottomControlsWhenReady();
mActionBar.removeOnMenuVisibilityListener(mMenuVisibilityListener);
- if (mShowSpinner) {
- mActionBar.disableAlbumModeMenu(true);
- }
+ // if (mShowSpinner) {
+ // mActionBar.disableAlbumModeMenu(true);
+ // }
onCommitDeleteImage();
mMenuExecutor.pause();
if (mMediaSet != null) mMediaSet.clearDeletion();
@@ -1438,14 +1507,14 @@
@Override
public void onFilmModeChanged(boolean enabled) {
refreshBottomControlsWhenReady();
- if (mShowSpinner) {
+ /*if (mShowSpinner) {
if (enabled) {
mActionBar.enableAlbumModeMenu(
GalleryActionBar.ALBUM_FILMSTRIP_MODE_SELECTED, this);
} else {
mActionBar.disableAlbumModeMenu(true);
}
- }
+ }*/
if (enabled) {
mHandler.removeMessages(MSG_HIDE_BARS);
UsageStatistics.onContentViewChanged(
@@ -1538,13 +1607,17 @@
mModel.resume();
mPhotoView.resume();
mActionBar.setDisplayOptions(
- ((mSecureAlbum == null) && (mSetPathString != null)), false);
+ ((mSecureAlbum == null) && (mSetPathString != null)), true);
mActionBar.addOnMenuVisibilityListener(mMenuVisibilityListener);
refreshBottomControlsWhenReady();
- if (mShowSpinner && mPhotoView.getFilmMode()) {
- mActionBar.enableAlbumModeMenu(
- GalleryActionBar.ALBUM_FILMSTRIP_MODE_SELECTED, this);
+ if (((mSecureAlbum == null) && (mSetPathString != null))) {
+ mActivity.getToolbar().setNavigationContentDescription("back");
+ mActivity.getToolbar().setNavigationIcon(R.drawable.back);
}
+ // if (mShowSpinner && mPhotoView.getFilmMode()) {
+ // mActionBar.enableAlbumModeMenu(
+ // GalleryActionBar.ALBUM_FILMSTRIP_MODE_SELECTED, this);
+ // }
if (!mShowBars) {
mActionBar.hide();
mActivity.getGLRoot().setLightsOutMode(true);
@@ -1595,12 +1668,12 @@
}
}
- @Override
+ /*@Override
public void onAlbumModeSelected(int mode) {
if (mode == GalleryActionBar.ALBUM_GRID_MODE_SELECTED) {
switchToGrid();
}
- }
+ }*/
@Override
public void refreshBottomControlsWhenReady() {
diff --git a/src/com/android/gallery3d/app/PhotoPageBottomControls.java b/src/com/android/gallery3d/app/PhotoPageBottomControls.java
index 57f8b6f..f12f6fb 100644
--- a/src/com/android/gallery3d/app/PhotoPageBottomControls.java
+++ b/src/com/android/gallery3d/app/PhotoPageBottomControls.java
@@ -17,6 +17,8 @@
package com.android.gallery3d.app;
import android.content.Context;
+import android.content.res.Resources;
+import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -24,6 +26,7 @@
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.RelativeLayout;
+import android.widget.ImageButton;
import com.android.gallery3d.R;
@@ -50,6 +53,9 @@
private static final int CONTAINER_ANIM_DURATION_MS = 200;
private static final int CONTROL_ANIM_DURATION_MS = 150;
+ private ImageButton imgShare;
+ private RelativeLayout.LayoutParams defaultParams;
+
private static Animation getControlAnimForVisibility(boolean visible) {
Animation anim = visible ? new AlphaAnimation(0f, 1f)
: new AlphaAnimation(1f, 0f);
@@ -66,11 +72,16 @@
mContainer = (ViewGroup) inflater
.inflate(R.layout.photopage_bottom_controls, mParentLayout, false);
mParentLayout.addView(mContainer);
-
+ imgShare = (ImageButton) mContainer
+ .findViewById(R.id.photopage_bottom_control_share);
+ defaultParams = (RelativeLayout.LayoutParams) imgShare
+ .getLayoutParams();
for (int i = mContainer.getChildCount() - 1; i >= 0; i--) {
View child = mContainer.getChildAt(i);
child.setOnClickListener(this);
mControlsVisible.put(child, false);
+ if (i == 0)
+ mControlsVisible.put(mContainer, false);
}
mContainerAnimIn.setDuration(CONTAINER_ANIM_DURATION_MS);
@@ -79,6 +90,30 @@
mDelegate.refreshBottomControlsWhenReady();
}
+ public void setSharePositionForImage() {
+ RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) imgShare
+ .getLayoutParams();
+ params.removeRule(RelativeLayout.ALIGN_PARENT_START);
+ params.removeRule(RelativeLayout.ALIGN_PARENT_LEFT);
+ params.leftMargin = 0;
+ params.addRule(RelativeLayout.CENTER_IN_PARENT,-1);
+ imgShare.setLayoutParams(params);
+ }
+
+ public void setSharePositionForVideo(Context context) {
+ imgShare = (ImageButton) mContainer
+ .findViewById(R.id.photopage_bottom_control_share);
+ RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) imgShare
+ .getLayoutParams();
+ params.addRule(RelativeLayout.ALIGN_PARENT_START,-1);
+ Resources r = context.getResources();
+ int margin = (int) TypedValue.applyDimension(
+ TypedValue.COMPLEX_UNIT_DIP, 20, r.getDisplayMetrics());
+ params.leftMargin = margin;
+ imgShare.setLayoutParams(params);
+
+ }
+
private void hide() {
mContainer.clearAnimation();
mContainerAnimOut.reset();
diff --git a/src/com/android/gallery3d/data/ClusterAlbum.java b/src/com/android/gallery3d/data/ClusterAlbum.java
index 8681952..3f84cc9 100644
--- a/src/com/android/gallery3d/data/ClusterAlbum.java
+++ b/src/com/android/gallery3d/data/ClusterAlbum.java
@@ -17,6 +17,7 @@
package com.android.gallery3d.data;
import java.util.ArrayList;
+import com.android.gallery3d.util.GalleryUtils;
public class ClusterAlbum extends MediaSet implements ContentListener {
@SuppressWarnings("unused")
@@ -26,13 +27,22 @@
private DataManager mDataManager;
private MediaSet mClusterAlbumSet;
private MediaItem mCover;
+ private final int INVALID_COUNT = -1;
+ private int mImageCount = INVALID_COUNT;
+ private int mVideoCount = INVALID_COUNT;
+ private int mKind = -1;
+
+
+ private TimeLineTitleMediaItem mTimelineTitleMediaItem;
public ClusterAlbum(Path path, DataManager dataManager,
- MediaSet clusterAlbumSet) {
+ MediaSet clusterAlbumSet, int kind) {
super(path, nextVersionNumber());
mDataManager = dataManager;
mClusterAlbumSet = clusterAlbumSet;
mClusterAlbumSet.addContentListener(this);
+ mKind = kind;
+ mTimelineTitleMediaItem = new TimeLineTitleMediaItem(path);
}
public void setCoverMediaItem(MediaItem cover) {
@@ -48,12 +58,16 @@
mPaths = paths;
}
- ArrayList<Path> getMediaItems() {
+ public ArrayList<Path> getMediaItems() {
return mPaths;
}
public void setName(String name) {
mName = name;
+ mTimelineTitleMediaItem.setTitle(name);
+ /*if (mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ mTimelineTitleMediaItem = new TimeLineTitleMediaItem(name);
+ }*/
}
@Override
@@ -63,12 +77,52 @@
@Override
public int getMediaItemCount() {
+ if (mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ return mPaths.size()+1;
+ }
return mPaths.size();
}
+ public void setImageItemCount(int count) {
+ mImageCount = count;
+ if (mTimelineTitleMediaItem != null && mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ mTimelineTitleMediaItem.setImageCount(count);
+ }
+ }
+
+ public void setVideoItemCount(int count) {
+ mVideoCount = count;
+ if (mTimelineTitleMediaItem != null && mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ mTimelineTitleMediaItem.setVideoCount(count);
+ }
+ }
+
@Override
public ArrayList<MediaItem> getMediaItem(int start, int count) {
- return getMediaItemFromPath(mPaths, start, count, mDataManager);
+ //return getMediaItemFromPath(mPaths, start, count, mDataManager);
+ if (mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ if (mPaths.size() <= 0) return null;
+ if (start == 0) {
+ ArrayList<MediaItem> mediaItemList = new ArrayList<MediaItem>();
+ mediaItemList.addAll(getMediaItemFromPath(mPaths, start, count - 1, mDataManager));
+ mediaItemList.add(0, mTimelineTitleMediaItem);
+ return mediaItemList;
+ } else {
+ return getMediaItemFromPath(mPaths, start - 1, count, mDataManager);
+ }
+ } else {
+ return getMediaItemFromPath(mPaths, start, count, mDataManager);
+ }
+ }
+
+ @Override
+ public int getImageItemCount() {
+ return mImageCount;
+ }
+
+ @Override
+ public int getVideoItemCount() {
+ return mVideoCount;
}
public static ArrayList<MediaItem> getMediaItemFromPath(
@@ -102,6 +156,9 @@
@Override
public int getTotalMediaItemCount() {
+ if (mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ return mPaths.size()+1;
+ }
return mPaths.size();
}
@@ -140,4 +197,12 @@
public boolean isLeafAlbum() {
return true;
}
+
+ public TimeLineTitleMediaItem getTimelineTitle() {
+ return mTimelineTitleMediaItem;
+ }
+
+ public void setClusterKind(int kind) {
+ mKind = kind;
+ }
}
diff --git a/src/com/android/gallery3d/data/ClusterAlbumSet.java b/src/com/android/gallery3d/data/ClusterAlbumSet.java
index cb212ba..c16b6bf 100644
--- a/src/com/android/gallery3d/data/ClusterAlbumSet.java
+++ b/src/com/android/gallery3d/data/ClusterAlbumSet.java
@@ -20,9 +20,12 @@
import android.net.Uri;
import com.android.gallery3d.app.GalleryApp;
-
+import com.android.gallery3d.util.GalleryUtils;
+import com.android.gallery3d.common.Utils;
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.Arrays;
+import java.util.HashMap;
public class ClusterAlbumSet extends MediaSet implements ContentListener {
@SuppressWarnings("unused")
@@ -33,6 +36,10 @@
private ArrayList<ClusterAlbum> mAlbums = new ArrayList<ClusterAlbum>();
private boolean mFirstReloadDone;
+ private int mTotalMediaItemCount;
+ private ArrayList<Integer> mAlbumItemCountList;
+ private ArrayList<TimeLineTitleMediaItem> mTimelineTitleMediaList;
+
public ClusterAlbumSet(Path path, GalleryApp application,
MediaSet baseSet, int kind) {
super(path, INVALID_DATA_VERSION);
@@ -59,14 +66,20 @@
@Override
public long reload() {
- if (mBaseSet.reload() > mDataVersion) {
- if (mFirstReloadDone) {
- updateClustersContents();
- } else {
- updateClusters();
- mFirstReloadDone = true;
+ synchronized(this){
+ if (mBaseSet.reload() > mDataVersion) {
+ if (mFirstReloadDone) {
+ updateClustersContents();
+ } else {
+ updateClusters();
+ mFirstReloadDone = true;
+ }
+ mDataVersion = nextVersionNumber();
}
- mDataVersion = nextVersionNumber();
+ if (mKind == ClusterSource.CLUSTER_ALBUMSET_TIME) {
+ calculateTotalItemsCount();
+ createTimelineTitleMediaList();
+ }
}
return mDataVersion;
}
@@ -117,22 +130,24 @@
synchronized (DataManager.LOCK) {
album = (ClusterAlbum) dataManager.peekMediaObject(childPath);
if (album == null) {
- album = new ClusterAlbum(childPath, dataManager, this);
+ album = new ClusterAlbum(childPath, dataManager, this, mKind);
}
}
album.setMediaItems(clustering.getCluster(i));
album.setName(childName);
album.setCoverMediaItem(clustering.getClusterCover(i));
+ album.setImageItemCount(clustering.getClusterImageCount(i));
+ album.setVideoItemCount(clustering.getClusterVideoCount(i));
mAlbums.add(album);
}
}
- private void updateClustersContents() {
- final HashSet<Path> existing = new HashSet<Path>();
+ protected void updateClustersContents() {
+ final HashMap<Path, Integer> existing = new HashMap<Path, Integer>();
mBaseSet.enumerateTotalMediaItems(new MediaSet.ItemConsumer() {
@Override
public void consume(int index, MediaItem item) {
- existing.add(item.getPath());
+ existing.put(item.getPath(), item.getMediaType());
}
});
@@ -144,16 +159,111 @@
ArrayList<Path> oldPaths = mAlbums.get(i).getMediaItems();
ArrayList<Path> newPaths = new ArrayList<Path>();
int m = oldPaths.size();
+ int imageCount = 0;
+ int videoCount = 0;
+ int mediaType = MEDIA_TYPE_UNKNOWN;
+ ClusterAlbum album = mAlbums.get(i);
for (int j = 0; j < m; j++) {
Path p = oldPaths.get(j);
- if (existing.contains(p)) {
+ if (existing.containsKey(p)) {
newPaths.add(p);
+ mediaType = existing.get(p);
+ existing.remove(p);
+ if(mediaType == MediaObject.MEDIA_TYPE_IMAGE) {
+ imageCount++;
+ } else if(mediaType == MediaObject.MEDIA_TYPE_VIDEO) {
+ videoCount++;
+ }
}
}
- mAlbums.get(i).setMediaItems(newPaths);
+ album.setImageItemCount(imageCount);
+ album.setVideoItemCount(videoCount);
+ album.setMediaItems(newPaths);
if (newPaths.isEmpty()) {
mAlbums.remove(i);
}
}
+
+ updateClusters();
}
+
+ private void calculateTotalItemsCount() {
+ mTotalMediaItemCount = 0;
+ if( mAlbums != null && mAlbums.size() > 0) {
+ mAlbumItemCountList = new ArrayList<Integer>();
+ for(ClusterAlbum album: mAlbums) {
+ int count = album.getMediaItemCount();
+ mTotalMediaItemCount = mTotalMediaItemCount + count;
+ mAlbumItemCountList.add(mTotalMediaItemCount);
+ }
+ }
+ }
+
+ private void createTimelineTitleMediaList() {
+ if (mTimelineTitleMediaList == null) {
+ mTimelineTitleMediaList = new ArrayList<TimeLineTitleMediaItem>();
+ }
+ mTimelineTitleMediaList.clear();
+ for(ClusterAlbum album: mAlbums) {
+ mTimelineTitleMediaList.add(album.getTimelineTitle());
+ }
+ }
+
+ public TimeLineTitleMediaItem getTimelineTitleMediaItem(int index) {
+ if (mTimelineTitleMediaList == null || index >= mTimelineTitleMediaList.size()) {
+ return null;
+ }
+ return mTimelineTitleMediaList.get(index);
+ }
+
+ @Override
+ public int getMediaItemCount() {
+ return mTotalMediaItemCount;
+ }
+
+ @Override
+ public ArrayList<MediaItem> getMediaItem(int start, int count) {
+ if ((start + count) > mTotalMediaItemCount ) {
+ count = mTotalMediaItemCount - start;
+ }
+ if (count <= 0) return null;
+ ArrayList<MediaItem> mediaItems = new ArrayList<MediaItem>();
+ int startAlbum = findTimelineAlbumIndex(start);
+ int endAlbum = findTimelineAlbumIndex(start + count - 1);
+ int pAlbumCount = 0;
+ int s;
+ int lCount;
+ if (startAlbum > 0) {
+ pAlbumCount = mAlbumItemCountList.get(startAlbum -1);
+ }
+ s = start - pAlbumCount;
+ for (int i = startAlbum; i <= endAlbum && i < mAlbums.size(); ++i) {
+ int albumCount = mAlbums.get(i).getTotalMediaItemCount();
+ lCount = Math.min(albumCount - s, count);
+ ArrayList<MediaItem> items = mAlbums.get(i).getMediaItem(s, lCount);
+ if (items != null)
+ mediaItems.addAll(items);
+ count -= lCount;
+ s = 0;
+ }
+ return mediaItems;
+ }
+
+ public int findTimelineAlbumIndex(int itemIndex) {
+ int index = Arrays.binarySearch(mAlbumItemCountList.toArray(new Integer[0]), itemIndex);
+ if (index < mTotalMediaItemCount && index >= 0)
+ return index + 1;
+ if (index < 0) {
+ index = (index * (-1)) - 1;
+ }
+ return index;
+ }
+
+ public ClusterAlbum getAlbumFromindex(int index) {
+ int albumIndex = findTimelineAlbumIndex(index);
+ if (albumIndex >= 0 && albumIndex < mAlbums.size()) {
+ return mAlbums.get(albumIndex);
+ }
+ return null;
+ }
}
diff --git a/src/com/android/gallery3d/data/ClusterSource.java b/src/com/android/gallery3d/data/ClusterSource.java
index a1f22e5..f4ef110 100644
--- a/src/com/android/gallery3d/data/ClusterSource.java
+++ b/src/com/android/gallery3d/data/ClusterSource.java
@@ -77,7 +77,7 @@
MediaSet parent = dataManager.getMediaSet(path.getParent());
// The actual content in the ClusterAlbum will be filled later
// when the reload() method in the parent is run.
- return new ClusterAlbum(path, dataManager, parent);
+ return new ClusterAlbum(path, dataManager, parent, matchType);
}
default:
throw new RuntimeException("bad path: " + path);
diff --git a/src/com/android/gallery3d/data/Clustering.java b/src/com/android/gallery3d/data/Clustering.java
index 4072bf5..204bd1a 100644
--- a/src/com/android/gallery3d/data/Clustering.java
+++ b/src/com/android/gallery3d/data/Clustering.java
@@ -26,4 +26,12 @@
public MediaItem getClusterCover(int index) {
return null;
}
+
+ public int getClusterImageCount(int index) {
+ return 0;
+ }
+
+ public int getClusterVideoCount(int index) {
+ return 0;
+ }
}
diff --git a/src/com/android/gallery3d/data/FilterDeleteSet.java b/src/com/android/gallery3d/data/FilterDeleteSet.java
index f732973..fcf0dec 100644
--- a/src/com/android/gallery3d/data/FilterDeleteSet.java
+++ b/src/com/android/gallery3d/data/FilterDeleteSet.java
@@ -258,4 +258,8 @@
public int getNumberOfDeletions() {
return mCurrent.size();
}
+
+ public void setClusterKind(int kind) {
+ mBaseSet.setClusterKind(kind);
+ }
}
diff --git a/src/com/android/gallery3d/data/LocalAlbum.java b/src/com/android/gallery3d/data/LocalAlbum.java
index 7b7015a..24d3b1b 100644
--- a/src/com/android/gallery3d/data/LocalAlbum.java
+++ b/src/com/android/gallery3d/data/LocalAlbum.java
@@ -75,7 +75,11 @@
mProjection = LocalImage.PROJECTION;
mItemPath = LocalImage.ITEM_PATH;
} else {
+ if (mBucketId == -1) {
+ mWhereClause = null;
+ } else {
mWhereClause = VideoColumns.BUCKET_ID + " = ?";
+ }
mOrderClause = VideoColumns.DATE_TAKEN + " DESC, "
+ VideoColumns._ID + " DESC";
mBaseUri = Video.Media.EXTERNAL_CONTENT_URI;
@@ -88,9 +92,10 @@
public LocalAlbum(Path path, GalleryApp application, int bucketId,
boolean isImage) {
- this(path, application, bucketId, isImage,
- BucketHelper.getBucketName(
- application.getContentResolver(), bucketId));
+ this(path, application, bucketId, isImage, bucketId == -1 ? application
+ .getAndroidContext().getString(R.string.videos_title)
+ : BucketHelper.getBucketName(application.getContentResolver(),
+ bucketId));
}
@Override
@@ -118,10 +123,16 @@
.appendQueryParameter("limit", start + "," + count).build();
ArrayList<MediaItem> list = new ArrayList<MediaItem>();
GalleryUtils.assertNotInRenderThread();
- Cursor cursor = mResolver.query(
+ Cursor cursor;
+ if (mBucketId == -1) {
+ cursor = mResolver.query(uri, mProjection, mWhereClause, null,
+ mOrderClause);
+ } else {
+ cursor = mResolver.query(
uri, mProjection, mWhereClause,
new String[]{String.valueOf(mBucketId)},
mOrderClause);
+ }
if (cursor == null) {
Log.w(TAG, "query fail: " + uri);
return list;
@@ -229,9 +240,15 @@
@Override
public int getMediaItemCount() {
if (mCachedCount == INVALID_COUNT) {
- Cursor cursor = mResolver.query(
+ Cursor cursor;
+ if (mBucketId == -1) {
+ cursor = mResolver.query(mBaseUri, COUNT_PROJECTION,
+ mWhereClause, null, mOrderClause);
+ } else {
+ cursor = mResolver.query(
mBaseUri, COUNT_PROJECTION, mWhereClause,
new String[]{String.valueOf(mBucketId)}, null);
+ }
if (cursor == null) {
Log.w(TAG, "query fail");
return 0;
diff --git a/src/com/android/gallery3d/data/MediaItem.java b/src/com/android/gallery3d/data/MediaItem.java
index 92ac88d..9d952bc 100644
--- a/src/com/android/gallery3d/data/MediaItem.java
+++ b/src/com/android/gallery3d/data/MediaItem.java
@@ -57,6 +57,9 @@
public MediaItem(Path path, long version) {
super(path, version);
}
+ public MediaItem(Path path) {
+ super(path);
+ }
public long getDateInMs() {
return 0;
diff --git a/src/com/android/gallery3d/data/MediaObject.java b/src/com/android/gallery3d/data/MediaObject.java
index 6e38676..6f8eef3 100644
--- a/src/com/android/gallery3d/data/MediaObject.java
+++ b/src/com/android/gallery3d/data/MediaObject.java
@@ -52,6 +52,8 @@
public static final int MEDIA_TYPE_DRM_VIDEO = 5;
public static final int MEDIA_TYPE_DRM_IMAGE = 6;
public static final int MEDIA_TYPE_ALL = MEDIA_TYPE_IMAGE | MEDIA_TYPE_VIDEO;
+ //TYPE for Timeline Title
+ public static final int MEDIA_TYPE_TIMELINE_TITLE= 7;
public static final String MEDIA_TYPE_IMAGE_STRING = "image";
public static final String MEDIA_TYPE_VIDEO_STRING = "video";
@@ -85,6 +87,10 @@
mDataVersion = version;
}
+ public MediaObject(Path path) {
+ mPath = path;
+ }
+
public Path getPath() {
return mPath;
}
diff --git a/src/com/android/gallery3d/data/MediaSet.java b/src/com/android/gallery3d/data/MediaSet.java
index 4c009c7..9f7ffce 100644
--- a/src/com/android/gallery3d/data/MediaSet.java
+++ b/src/com/android/gallery3d/data/MediaSet.java
@@ -62,6 +62,14 @@
return 0;
}
+ public int getImageItemCount(){
+ return 0;
+ }
+
+ public int getVideoItemCount(){
+ return 0;
+ }
+
// Returns the media items in the range [start, start + count).
//
// The number of media items returned may be less than the specified count
@@ -350,4 +358,6 @@
if (listener != null) listener.onSyncDone(MediaSet.this, mResult);
}
}
+
+ public void setClusterKind(int kind){};
}
diff --git a/src/com/android/gallery3d/data/TimeClustering.java b/src/com/android/gallery3d/data/TimeClustering.java
index 35cbab1..87111f2 100644
--- a/src/com/android/gallery3d/data/TimeClustering.java
+++ b/src/com/android/gallery3d/data/TimeClustering.java
@@ -108,6 +108,7 @@
if (index < 0 || index >= total) return;
SmallItem s = new SmallItem();
s.path = item.getPath();
+ s.mediaType = item.getMediaType();
s.dateInMs = item.getDateInMs();
item.getLatLong(latLng);
s.lat = latLng[0];
@@ -189,6 +190,19 @@
mMaxClusterSize = Utils.clamp(mMaxClusterSize, MIN_MAX_CLUSTER_SIZE, MAX_MAX_CLUSTER_SIZE);
}
+ @Override
+ public int getClusterImageCount(int index) {
+ // TODO Auto-generated method stub
+ return mClusters.get(index).mPhotoCount;
+
+ }
+
+ @Override
+ public int getClusterVideoCount(int index) {
+ // TODO Auto-generated method stub
+ return mClusters.get(index).mVideoCount;
+ }
+
private void compute(SmallItem currentItem) {
if (currentItem != null) {
int numClusters = mClusters.size();
@@ -343,12 +357,15 @@
Path path;
long dateInMs;
double lat, lng;
+ int mediaType;
}
class Cluster {
@SuppressWarnings("unused")
private static final String TAG = "Cluster";
private static final String MMDDYY_FORMAT = "MMddyy";
+ public int mPhotoCount = 0;
+ public int mVideoCount = 0;
// This is for TimeClustering only.
public boolean mGeographicallySeparatedFromPrevCluster = false;
@@ -359,6 +376,11 @@
}
public void addItem(SmallItem item) {
+ if(item.mediaType == MediaObject.MEDIA_TYPE_IMAGE) {
+ mPhotoCount++;
+ } else if(item.mediaType == MediaObject.MEDIA_TYPE_VIDEO) {
+ mVideoCount++;
+ }
mItems.add(item);
}
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index fbb832f..4ff3e2f 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -20,6 +20,7 @@
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Vector;
+import java.util.Locale;
import android.app.ActionBar;
import android.app.AlertDialog;
@@ -47,22 +48,31 @@
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.print.PrintHelper;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
+import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
+import android.view.Window;
import android.view.View.OnClickListener;
+import android.view.View.OnTouchListener;
import android.view.ViewPropertyAnimator;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
+import android.widget.Button;
import android.widget.FrameLayout;
+import android.widget.ImageButton;
+import android.widget.LinearLayout;
import android.widget.PopupMenu;
+import android.widget.RelativeLayout;
+import android.widget.RelativeLayout.LayoutParams;
import android.widget.ShareActionProvider;
import android.widget.ShareActionProvider.OnShareTargetSelectedListener;
import android.widget.Toast;
@@ -129,6 +139,7 @@
private ImageShow mImageShow = null;
private View mSaveButton = null;
+ private View mDoneButton = null, mCancelButton = null;
private EditorPlaceHolder mEditorPlaceHolder = new EditorPlaceHolder(this);
private Editor mCurrentEditor = null;
@@ -185,6 +196,14 @@
private PopupMenu mCurrentMenu = null;
private boolean mLoadingVisible = true;
private boolean mReleaseDualCamOnDestory = true;
+ private FrameLayout mCategoryFragment;
+ private View mEffectsContainer;
+ private View mEffectsTextContainer;
+ private ImageButton imgComparison;
+ private String mPopUpText, mExit;
+ RelativeLayout rlImageContainer;
+ boolean isOrientationChanged;
+ private boolean isComingFromEditorScreen;
public ProcessingService getProcessingService() {
return mBoundService;
@@ -262,7 +281,6 @@
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
boolean onlyUsePortrait = getResources().getBoolean(R.bool.only_use_portrait);
if (onlyUsePortrait) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
@@ -282,7 +300,13 @@
if (findViewById(R.id.main_panel_container) == null) {
return;
}
+ Fragment main = getSupportFragmentManager().findFragmentByTag(
+ MainPanel.FRAGMENT_TAG);
MainPanel panel = new MainPanel();
+ Bundle bundle = new Bundle();
+ bundle.putBoolean(MainPanel.EDITOR_TAG, isComingFromEditorScreen);
+ panel.setArguments(bundle);
+ isComingFromEditorScreen = false;
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.main_panel_container, panel, MainPanel.FRAGMENT_TAG);
transaction.commitAllowingStateLoss();
@@ -300,6 +324,7 @@
public void run() {
EditorPanel panel = new EditorPanel();
panel.setEditor(currentId);
+ setActionBarForEffects(currentEditor);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.remove(getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG));
transaction.replace(R.id.main_panel_container, panel, MainPanel.FRAGMENT_TAG);
@@ -336,20 +361,15 @@
private void loadXML() {
setContentView(R.layout.filtershow_activity);
-
- ActionBar actionBar = getActionBar();
- actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
- actionBar.setCustomView(R.layout.filtershow_actionbar);
- actionBar.setBackgroundDrawable(new ColorDrawable(
- getResources().getColor(R.color.background_screen)));
-
- mSaveButton = actionBar.getCustomView();
- mSaveButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View view) {
- saveImage();
- }
- });
+ Resources r = getResources();
+ setActionBar(false);
+ mPopUpText = r.getString(R.string.save_and_exit).toUpperCase(
+ Locale.getDefault());
+ mExit = r.getString(R.string.exit).toUpperCase(Locale.getDefault());
+ int marginTop = r.getDimensionPixelSize(R.dimen.compare_margin_top);
+ int marginRight = r.getDimensionPixelSize(R.dimen.compare_margin_right);
+ imgComparison = (ImageButton) findViewById(R.id.imgComparison);
+ rlImageContainer = (RelativeLayout) findViewById(R.id.imageContainer);
mImageShow = (ImageShow) findViewById(R.id.imageShow);
mImageViews.add(mImageShow);
@@ -360,6 +380,181 @@
mImageShow.attach();
setupStatePanel();
+
+ imgComparison.setOnTouchListener(new OnTouchListener() {
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ int action = event.getAction();
+ action = action & MotionEvent.ACTION_MASK;
+ if (action == MotionEvent.ACTION_DOWN) {
+
+ HistoryManager adapter = mMasterImage.getHistory();
+ int position = adapter.backToOriginal();// adapter.undo();
+ mMasterImage.onHistoryItemClick(position);
+ v.setPressed(true);
+ backToMain();
+ invalidateViews();
+ }
+ if (action == MotionEvent.ACTION_UP
+ || action == MotionEvent.ACTION_CANCEL
+ || action == MotionEvent.ACTION_OUTSIDE) {
+ v.setPressed(false);
+ HistoryManager adapter = mMasterImage.getHistory();
+ int position = adapter.backToCurrent();
+ mMasterImage.onHistoryItemClick(position);
+ invalidateViews();
+
+ }
+
+ return false;
+ }
+ });
+ }
+
+ public void toggleComparisonButtonVisibility() {
+ if (imgComparison.getVisibility() == View.VISIBLE)
+ imgComparison.setVisibility(View.GONE);
+ }
+
+ public void setActionBar(boolean isEffectClicked) {
+ ActionBar actionBar = getActionBar();
+ actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
+ actionBar.setBackgroundDrawable(new ColorDrawable(getResources()
+ .getColor(R.color.edit_actionbar_background)));
+ if (!isEffectClicked) {
+ actionBar.setCustomView(R.layout.filtershow_actionbar);
+ mSaveButton = actionBar.getCustomView();
+ mSaveButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ saveImage();
+ }
+ });
+ invalidateOptionsMenu();
+ } else {
+ mMenu.clear();
+ final Fragment main = getSupportFragmentManager().findFragmentByTag(
+ MainPanel.FRAGMENT_TAG);
+
+ actionBar.setCustomView(R.layout.filtershow_actionbar_new);
+ mCancelButton = actionBar.getCustomView().findViewById(
+ R.id.imgCancel);
+ mDoneButton = actionBar.getCustomView().findViewById(R.id.imgDone);
+ mCancelButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ MainPanel mainPanel = (MainPanel) main;
+ mainPanel.toggleEffectsTrayVisibility(true);
+ setActionBar(false);
+ HistoryManager adapter = mMasterImage.getHistory();
+ int position = adapter.undoCurrentFilter();
+ mMasterImage.onHistoryItemClick(position);
+ adapter.resetActiveFilter();
+ backToMain();
+ invalidateViews();
+ }
+ });
+ mDoneButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ // saveImage();
+ MainPanel mainPanel = (MainPanel) main;
+ mainPanel.toggleEffectsTrayVisibility(true);
+ setActionBar(false);
+ HistoryManager adapter = mMasterImage
+ .getHistory();
+ adapter.resetActiveFilter();
+ }
+ });
+ isEffectClicked = false;
+ }
+
+ }
+
+ public void setActionBarForEffects(final Editor currentEditor) {
+ View view;
+ LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ view = inflater.inflate(R.layout.filtershow_editor_panel, null);
+ View editControl = view.findViewById(R.id.controlArea);
+ ActionBar actionBar = getActionBar();
+ actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
+ actionBar.setBackgroundDrawable(new ColorDrawable(getResources()
+ .getColor(R.color.edit_actionbar_background)));
+ actionBar.setCustomView(R.layout.filtershow_actionbar_effects);
+ ImageButton cancelButton = (ImageButton) actionBar.getCustomView()
+ .findViewById(R.id.cancelFilter);
+ ImageButton applyButton = (ImageButton) actionBar.getCustomView()
+ .findViewById(R.id.applyFilter);
+ Button editTitle = (Button) actionBar.getCustomView().findViewById(
+ R.id.applyEffect);
+ editTitle.setTransformationMethod(null);
+ View actionControl = actionBar.getCustomView().findViewById(
+ R.id.panelAccessoryViewList);
+ cancelButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ cancelCurrentFilter();
+ FilterShowActivity.this.backToMain();
+ setActionBar(false);
+ }
+ });
+ applyButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ currentEditor.finalApplyCalled();
+ FilterShowActivity.this.backToMain();
+ setActionBar(false);
+ }
+ });
+
+ if (currentEditor != null) {
+ currentEditor.setUpEditorUI(editTitle, actionControl, editControl);
+ currentEditor.reflectCurrentFilter();
+ if (currentEditor.useUtilityPanel()) {
+ currentEditor.openUtilityPanel((LinearLayout) actionControl);
+ }
+ }
+ }
+
+ public void cancelCurrentFilter() {
+ MasterImage masterImage = MasterImage.getImage();
+ HistoryManager adapter = masterImage.getHistory();
+
+ int position = adapter.undo();
+ masterImage.onHistoryItemClick(position);
+ invalidateViews();
+ }
+
+ private void toggleEffectsTrayVisibility(boolean isEffectTrayEnabled) {
+ if (isEffectTrayEnabled) {
+ mCategoryFragment.setVisibility(View.VISIBLE);
+ mEffectsContainer.setVisibility(View.GONE);
+ mEffectsTextContainer.setVisibility(View.GONE);
+ } else {
+ mCategoryFragment.setVisibility(View.GONE);
+ mEffectsContainer.setVisibility(View.VISIBLE);
+ mEffectsTextContainer.setVisibility(View.VISIBLE);
+ }
+ }
+
+ public void adjustCompareButton(boolean scaled) {
+ Resources r = getResources();
+ int marginTop, marginRight;
+ if (scaled) {
+ marginTop = r
+ .getDimensionPixelSize(R.dimen.compare_margin_top_scaled);
+ marginRight = r
+ .getDimensionPixelSize(R.dimen.compare_margin_right_scaled);
+ } else {
+ marginTop = r.getDimensionPixelSize(R.dimen.compare_margin_top);
+ marginRight = r.getDimensionPixelSize(R.dimen.compare_margin_right);
+
+ }
+ RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) imgComparison
+ .getLayoutParams();
+ params.setMargins(0, marginTop, marginRight, 0);
+ imgComparison.setLayoutParams(params);
}
public void fillCategories() {
@@ -705,6 +900,8 @@
public void setCurrentPanel(int currentPanel) {
mCurrentPanel = currentPanel;
+ HistoryManager adapter = mMasterImage.getHistory();
+ adapter.setActiveFilter(currentPanel);
}
public int getCurrentPanel() {
@@ -1030,16 +1227,11 @@
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ menu.clear();
getMenuInflater().inflate(R.menu.filtershow_activity_menu, menu);
- MenuItem showState = menu.findItem(R.id.showImageStateButton);
- if (mShowingImageStatePanel) {
- showState.setTitle(R.string.hide_imagestate_panel);
- } else {
- showState.setTitle(R.string.show_imagestate_panel);
- }
- mShareActionProvider = (ShareActionProvider) menu.findItem(R.id.menu_share)
- .getActionProvider();
+ mShareActionProvider = (ShareActionProvider) menu.findItem(
+ R.id.menu_share).getActionProvider();
mShareActionProvider.setShareIntent(getDefaultShareIntent());
mShareActionProvider.setOnShareTargetSelectedListener(this);
mMenu = menu;
@@ -1051,14 +1243,14 @@
if (mMenu == null || mMasterImage == null) {
return;
}
- MenuItem undoItem = mMenu.findItem(R.id.undoButton);
- MenuItem redoItem = mMenu.findItem(R.id.redoButton);
+ //MenuItem undoItem = mMenu.findItem(R.id.undoButton);
+ //MenuItem redoItem = mMenu.findItem(R.id.redoButton);
MenuItem resetItem = mMenu.findItem(R.id.resetHistoryButton);
MenuItem printItem = mMenu.findItem(R.id.printButton);
if (!PrintHelper.systemSupportsPrint()) {
printItem.setVisible(false);
}
- mMasterImage.getHistory().setMenuItems(undoItem, redoItem, resetItem);
+ //mMasterImage.getHistory().setMenuItems(undoItem, redoItem, resetItem);
}
@Override
@@ -1085,7 +1277,7 @@
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
- case R.id.undoButton: {
+ /*case R.id.undoButton: {
HistoryManager adapter = mMasterImage.getHistory();
int position = adapter.undo();
mMasterImage.onHistoryItemClick(position);
@@ -1099,15 +1291,15 @@
mMasterImage.onHistoryItemClick(position);
invalidateViews();
return true;
- }
+ }*/
case R.id.resetHistoryButton: {
resetHistory();
return true;
}
- case R.id.showImageStateButton: {
+ /*case R.id.showImageStateButton: {
toggleImageStatePanel();
return true;
- }
+ }*/
case R.id.exportFlattenButton: {
showExportOptionsDialog();
return true;
@@ -1303,9 +1495,9 @@
if (mMasterImage == null) {
return;
}
- loadXML();
- fillCategories();
- loadMainPanel();
+ //loadXML();
+ //fillCategories();
+ //loadMainPanel();
if (mCurrentMenu != null) {
mCurrentMenu.dismiss();
@@ -1376,28 +1568,81 @@
@Override
public void onBackPressed() {
- Fragment currentPanel = getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG);
+ if (imgComparison != null && imgComparison.getVisibility() == View.GONE) {
+ imgComparison.setVisibility(View.VISIBLE);
+ }
+ Fragment currentPanel = getSupportFragmentManager().findFragmentByTag(
+ MainPanel.FRAGMENT_TAG);
+
if (currentPanel instanceof MainPanel) {
- if (!mImageShow.hasModifications()) {
- done();
+ MainPanel mainPanel = (MainPanel) currentPanel;
+ if (mainPanel.isCategoryPanelVisible()) {
+ if (mImageShow.hasModifications()) {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setMessage(R.string.unsaved).setTitle(
+ R.string.save_before_exit);
+ builder.setPositiveButton(mPopUpText,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog,
+ int id) {
+ // saveImage();
+ HistoryManager adapter = mMasterImage
+ .getHistory();
+ adapter.resetActiveFilter();
+ }
+ });
+ builder.setNegativeButton(mExit,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog,
+ int id) {
+ HistoryManager adapter = mMasterImage
+ .getHistory();
+ int position = adapter.undoCurrentFilter();
+ mMasterImage.onHistoryItemClick(position);
+ adapter.resetActiveFilter();
+ backToMain();
+ invalidateViews();
+ }
+ });
+ builder.show();
+ }
+ setActionBar(false);
+ mainPanel.toggleEffectsTrayVisibility(true);
+ invalidateOptionsMenu();
+ if (MasterImage.getImage().getScaleFactor() < 1)
+ setScaleImage(false);
+ adjustCompareButton(false);
+
} else {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setMessage(R.string.unsaved).setTitle(R.string.save_before_exit);
- builder.setPositiveButton(R.string.save_and_exit, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- saveImage();
- }
- });
- builder.setNegativeButton(R.string.exit, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int id) {
- done();
- }
- });
- builder.show();
+ if (!mImageShow.hasModifications()) {
+ done();
+ } else {
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setMessage(R.string.unsaved).setTitle(
+ R.string.save_before_exit);
+ builder.setPositiveButton(R.string.save_and_exit,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog,
+ int id) {
+ saveImage();
+ }
+ });
+ builder.setNegativeButton(R.string.exit,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog,
+ int id) {
+ done();
+ }
+ });
+ builder.show();
+ }
}
} else {
+ isComingFromEditorScreen = true;
backToMain();
}
}
@@ -1571,4 +1816,8 @@
}
});
}
+
+ public void setScaleImage(boolean isScaled) {
+ mImageShow.scaleImage(isScaled,getBaseContext());
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryView.java b/src/com/android/gallery3d/filtershow/category/CategoryView.java
index 1570517..99af80f 100644
--- a/src/com/android/gallery3d/filtershow/category/CategoryView.java
+++ b/src/com/android/gallery3d/filtershow/category/CategoryView.java
@@ -64,7 +64,7 @@
mSelectPaint.setColor(mSelectionColor);
mBorderPaint = new Paint(mSelectPaint);
- mBorderPaint.setColor(Color.BLACK);
+// mBorderPaint.setColor(Color.BLACK);
mBorderStroke = mSelectionStroke / 3;
}
diff --git a/src/com/android/gallery3d/filtershow/category/IconView.java b/src/com/android/gallery3d/filtershow/category/IconView.java
index cba2d79..089203a 100644
--- a/src/com/android/gallery3d/filtershow/category/IconView.java
+++ b/src/com/android/gallery3d/filtershow/category/IconView.java
@@ -69,7 +69,7 @@
private void setup(Context context) {
Resources res = getResources();
mTextColor = res.getColor(R.color.filtershow_categoryview_text);
- mBackgroundColor = res.getColor(R.color.filtershow_categoryview_background);
+ mBackgroundColor = res.getColor(android.R.color.transparent);
mMargin = res.getDimensionPixelOffset(R.dimen.category_panel_margin);
mTextSize = res.getDimensionPixelSize(R.dimen.category_panel_text_size);
}
@@ -80,7 +80,7 @@
}
mPaint.setTextSize(mTextSize);
if (getOrientation() == VERTICAL) {
- text = text.toUpperCase();
+// text = text.toUpperCase();
// TODO: set this in xml
mPaint.setTypeface(Typeface.DEFAULT_BOLD);
}
@@ -108,7 +108,7 @@
// justify to the left.
x = mMargin;
}
- int y = canvas.getHeight() - 2*mMargin;
+ int y = canvas.getHeight() / 2 ;//- 2*mMargin;
canvas.drawText(text, x, y, mPaint);
}
diff --git a/src/com/android/gallery3d/filtershow/category/MainPanel.java b/src/com/android/gallery3d/filtershow/category/MainPanel.java
index a80df3b..93da39c 100644
--- a/src/com/android/gallery3d/filtershow/category/MainPanel.java
+++ b/src/com/android/gallery3d/filtershow/category/MainPanel.java
@@ -22,8 +22,11 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.util.Log;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
@@ -43,8 +46,13 @@
private ImageButton filtersButton;
private ImageButton dualCamButton;
private ImageButton makeupButton;
+ private View mEffectsContainer;
+ private View mEffectsTextContainer;
+ private FrameLayout mCategoryFragment;
+ private View mBottomView;
public static final String FRAGMENT_TAG = "MainPanel";
+ public static final String EDITOR_TAG = "coming-from-editor-panel";
public static final int LOOKS = 0;
public static final int BORDERS = 1;
public static final int GEOMETRY = 2;
@@ -55,6 +63,7 @@
private int mCurrentSelected = -1;
private int mPreviousToggleVersions = -1;
+ private boolean isEffectClicked;
private void selection(int position, boolean value) {
if (value) {
@@ -114,9 +123,21 @@
geometryButton = (ImageButton) mMainView.findViewById(R.id.geometryButton);
filtersButton = (ImageButton) mMainView.findViewById(R.id.colorsButton);
dualCamButton = (ImageButton) mMainView.findViewById(R.id.dualCamButton);
+ mCategoryFragment = (FrameLayout) mMainView
+ .findViewById(R.id.category_panel_container);
+ mBottomView = mMainView.findViewById(R.id.bottom_panel);
+ mEffectsContainer = mMainView.findViewById(R.id.effectsContainer);
+ mEffectsTextContainer = mMainView.findViewById(R.id.effectsText);
if(SimpleMakeupImageFilter.HAS_TS_MAKEUP) {
makeupButton = (ImageButton) mMainView.findViewById(R.id.makeupButton);
makeupButton.setVisibility(View.VISIBLE);
+ TextView beautify = (TextView) mEffectsTextContainer
+ .findViewById(R.id.tvBeautify);
+ beautify.setVisibility(View.VISIBLE);
+ }
+ boolean showPanel = false;
+ if (getArguments() != null) {
+ showPanel = getArguments().getBoolean(EDITOR_TAG);
}
if(makeupButton != null) {
@@ -161,8 +182,10 @@
enableDualCameraButton(DualCameraNativeEngine.getInstance().isLibLoaded());
FilterShowActivity activity = (FilterShowActivity) getActivity();
- showImageStatePanel(activity.isShowingImageStatePanel());
- showPanel(activity.getCurrentPanel());
+ //showImageStatePanel(activity.isShowingImageStatePanel());
+ if (showPanel) {
+ showPanel(activity.getCurrentPanel());
+ }
return mMainView;
}
@@ -173,13 +196,39 @@
return true;
}
+ public boolean isCategoryPanelVisible() {
+ return (View.VISIBLE == mCategoryFragment.getVisibility());
+ }
+
+ public void toggleEffectsTrayVisibility(boolean isCategoryTrayVisible) {
+ if (isCategoryTrayVisible) {
+ mCategoryFragment.setVisibility(View.GONE);
+ mEffectsContainer.setVisibility(View.VISIBLE);
+ mEffectsTextContainer.setVisibility(View.VISIBLE);
+ } else {
+ mCategoryFragment.setVisibility(View.VISIBLE);
+ mEffectsContainer.setVisibility(View.GONE);
+ mEffectsTextContainer.setVisibility(View.GONE);
+ }
+ }
+
private void setCategoryFragment(CategoryPanel category, boolean fromRight) {
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
if (fromRight) {
transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_right);
} else {
transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left);
}
+ if (isEffectClicked) {
+ toggleEffectsTrayVisibility(false);
+ activity.setActionBar(isEffectClicked);
+ isEffectClicked = false;
+ } else {
+ toggleEffectsTrayVisibility(true);
+ activity.setActionBar(isEffectClicked);
+
+ }
transaction.replace(R.id.category_panel_container, category, CategoryPanel.FRAGMENT_TAG);
transaction.commitAllowingStateLoss();
}
@@ -198,9 +247,9 @@
}
public void loadCategoryBorderPanel() {
- if (mCurrentSelected == BORDERS) {
+ /*if (mCurrentSelected == BORDERS) {
return;
- }
+ }*/
boolean fromRight = isRightAnimation(BORDERS);
selection(mCurrentSelected, false);
CategoryPanel categoryPanel = new CategoryPanel();
@@ -211,7 +260,7 @@
}
public void loadCategoryMakeupPanel() {
- if (makeupButton == null || mCurrentSelected == MAKEUP) {
+ if (makeupButton == null) {
return;
}
boolean fromRight = isRightAnimation(MAKEUP);
@@ -224,9 +273,9 @@
}
public void loadCategoryGeometryPanel() {
- if (mCurrentSelected == GEOMETRY) {
+ /*if (mCurrentSelected == GEOMETRY) {
return;
- }
+ }*/
if (MasterImage.getImage().hasTinyPlanet()) {
return;
}
@@ -240,9 +289,9 @@
}
public void loadCategoryFiltersPanel() {
- if (mCurrentSelected == FILTERS) {
+ /*if (mCurrentSelected == FILTERS) {
return;
- }
+ }*/
boolean fromRight = isRightAnimation(FILTERS);
selection(mCurrentSelected, false);
CategoryPanel categoryPanel = new CategoryPanel();
@@ -253,9 +302,9 @@
}
public void loadCategoryVersionsPanel() {
- if (mCurrentSelected == VERSIONS) {
+ /*if (mCurrentSelected == VERSIONS) {
return;
- }
+ }*/
FilterShowActivity activity = (FilterShowActivity) getActivity();
activity.updateVersions();
boolean fromRight = isRightAnimation(VERSIONS);
@@ -268,9 +317,9 @@
}
public void loadCategoryDualCamPanel() {
- if (mCurrentSelected == DUALCAM) {
+ /*if (mCurrentSelected == DUALCAM) {
return;
- }
+ }*/
boolean fromRight = isRightAnimation(DUALCAM);
selection(mCurrentSelected, false);
CategoryPanel categoryPanel = new CategoryPanel();
@@ -281,9 +330,11 @@
}
public void showPanel(int currentPanel) {
+ isEffectClicked = true;
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
switch (currentPanel) {
case LOOKS: {
- loadCategoryLookPanel(false);
+ loadCategoryLookPanel(true);
break;
}
case BORDERS: {
@@ -311,6 +362,13 @@
break;
}
}
+ if (currentPanel > 0) {
+ activity.setScaleImage(true);
+ activity.adjustCompareButton(true);
+ } else {
+ activity.setScaleImage(false);
+ activity.adjustCompareButton(false);
+ }
}
public void setToggleVersionsPanelButton(ImageButton button) {
diff --git a/src/com/android/gallery3d/filtershow/controller/BasicSlider.java b/src/com/android/gallery3d/filtershow/controller/BasicSlider.java
index 811b474..1ff3e16 100644
--- a/src/com/android/gallery3d/filtershow/controller/BasicSlider.java
+++ b/src/com/android/gallery3d/filtershow/controller/BasicSlider.java
@@ -21,14 +21,17 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.editors.Editor;
public class BasicSlider implements Control {
private SeekBar mSeekBar;
+ private TextView mFilterValue,mFilterText;
private ParameterInteger mParameter;
Editor mEditor;
@@ -42,8 +45,12 @@
(LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout lp = (LinearLayout) inflater.inflate(
R.layout.filtershow_seekbar, container, true);
+ LinearLayout lpBasicFilterContainer = (LinearLayout) lp.findViewById(R.id.basicFilterContainer);
mSeekBar = (SeekBar) lp.findViewById(R.id.primarySeekBar);
+ mFilterText = (TextView)lpBasicFilterContainer.findViewById(R.id.tvFilterName);
+ mFilterValue = (TextView)lpBasicFilterContainer.findViewById(R.id.tvFilterValue);
mSeekBar.setVisibility(View.VISIBLE);
+ mEditor.setBasicFilterUI(mFilterText, mFilterValue);
updateUI();
mSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
diff --git a/src/com/android/gallery3d/filtershow/controller/StyleChooser.java b/src/com/android/gallery3d/filtershow/controller/StyleChooser.java
index dc31401..ab17d63 100644
--- a/src/com/android/gallery3d/filtershow/controller/StyleChooser.java
+++ b/src/com/android/gallery3d/filtershow/controller/StyleChooser.java
@@ -45,7 +45,7 @@
LayoutParams lp = new LayoutParams(dim, dim);
for (int i = 0; i < n; i++) {
final ImageButton button = new ImageButton(context);
- button.setScaleType(ScaleType.CENTER_CROP);
+ button.setScaleType(ScaleType.CENTER_INSIDE);
button.setLayoutParams(lp);
button.setBackgroundResource(android.R.color.transparent);
mIconButton.add(button);
diff --git a/src/com/android/gallery3d/filtershow/controller/TitledSlider.java b/src/com/android/gallery3d/filtershow/controller/TitledSlider.java
index f29442b..8031b75 100644
--- a/src/com/android/gallery3d/filtershow/controller/TitledSlider.java
+++ b/src/com/android/gallery3d/filtershow/controller/TitledSlider.java
@@ -88,7 +88,7 @@
@Override
public void updateUI() {
if (mControlName != null && mParameter.getParameterName() != null) {
- mControlName.setText(mParameter.getParameterName().toUpperCase());
+ mControlName.setText(mParameter.getParameterName());
}
if (mControlValue != null) {
mControlValue.setText(
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java
index e3eec39..490e599 100644
--- a/src/com/android/gallery3d/filtershow/editors/Editor.java
+++ b/src/com/android/gallery3d/filtershow/editors/Editor.java
@@ -31,9 +31,11 @@
import android.widget.PopupMenu;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.TextView;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.controller.Control;
+import com.android.gallery3d.filtershow.filters.FilterBasicRepresentation;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.imageshow.ImageShow;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
@@ -62,6 +64,9 @@
public static byte SHOW_VALUE_UNDEFINED = -1;
public static byte SHOW_VALUE_OFF = 0;
public static byte SHOW_VALUE_INT = 1;
+ private View mActionButton, mEditControl;
+ private TextView mBasicFilterText;
+ private TextView mBasicFilterValue;
public static void hackFixStrings(Menu menu) {
int count = menu.size();
@@ -72,7 +77,7 @@
}
public String calculateUserMessage(Context context, String effectName, Object parameterValue) {
- return effectName.toUpperCase() + " " + parameterValue;
+ return effectName + " " + parameterValue;
}
protected Editor(int id) {
@@ -91,16 +96,37 @@
return true;
}
- public void setUpEditorUI(View actionButton, View editControl,
+ /*public void setUpEditorUI(View actionButton, View editControl,
Button editTitle, Button stateButton) {
mEditTitle = editTitle;
mFilterTitle = stateButton;
mButton = editTitle;
MasterImage.getImage().resetGeometryImages(false);
setUtilityPanelUI(actionButton, editControl);
+ }*/
+
+ public void setUpEditorUI(View editControl, Button stateButton) {
+
+ mFilterTitle = stateButton;
+ MasterImage.getImage().resetGeometryImages(false);
+ mEditControl = editControl;
+ setUtilityPanelUI(null, editControl);
}
- public boolean showsPopupIndicator() {
+ public void setUpEditorUI(Button editTitle, View actionButton,
+ View editControl) {
+ mEditTitle = editTitle;
+ mButton = editTitle;
+ setUtilityPanelUI(actionButton, editControl);
+ }
+
+ public void setBasicFilterUI(TextView textFilterName,
+ TextView textFilterValue) {
+ mBasicFilterText = textFilterName;
+ mBasicFilterValue = textFilterValue;
+ }
+
+ public boolean showsPopupIndicator() {
return false;
}
@@ -257,6 +283,19 @@
s = mContext.getString(mLocalRepresentation.getTextId());
}
mButton.setText(calculateUserMessage(mContext, s, ""));
+ if (mLocalRepresentation instanceof FilterBasicRepresentation
+ && mBasicFilterText != null) {
+ mBasicFilterText.setText(s);
+ String text = calculateUserMessage(mContext, s, "");
+ String[] split = text.split("[+-]");
+ int length = split.length;
+ if (length == 2)
+ mBasicFilterValue.setText(split[1] != null ? split[1] : "");
+ mBasicFilterText.setVisibility(View.VISIBLE);
+ mBasicFilterValue.setVisibility(View.VISIBLE);
+ mButton.setVisibility(View.INVISIBLE);
+
+ }
}
/**
@@ -285,7 +324,7 @@
protected void setMenuIcon(boolean on) {
mEditTitle.setCompoundDrawablesRelativeWithIntrinsicBounds(
- 0, 0, on ? R.drawable.filtershow_menu_marker_rtl : 0, 0);
+ 0, 0, on ? R.drawable.spinner_triangle : 0, 0);
}
protected void createMenu(int[] strId, View button) {
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorChanSat.java b/src/com/android/gallery3d/filtershow/editors/EditorChanSat.java
index abf0a69..135c193 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorChanSat.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorChanSat.java
@@ -162,7 +162,7 @@
value = rep.getValue(FilterChanSatRepresentation.MODE_MAGENTA);
mMagentaBar.setProgress(value + 100);
mMagentaValue.setText("" + value);
- String text = mContext.getString(rep.getTextId()).toUpperCase();
+ String text = mContext.getString(rep.getTextId());
mFilterTitle.setText(text);
updateText();
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
index 58bde12..33e3280 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
@@ -61,11 +61,11 @@
private static final int MODE_STYLE = FilterDrawRepresentation.PARAM_STYLE;
private static final int MODE_COLOR = FilterDrawRepresentation.PARAM_COLOR;
int[] brushIcons = {
- R.drawable.brush_flat,
- R.drawable.brush_round,
- R.drawable.brush_gauss,
- R.drawable.brush_marker,
- R.drawable.brush_spatter
+ R.drawable.square,
+ R.drawable.round,
+ R.drawable.feather,
+ R.drawable.rectangle,
+ R.drawable.random
};
int[] mBasColors = {
@@ -257,7 +257,7 @@
R.layout.filtershow_draw_ui, (ViewGroup) editControl, true);
mTabletUI = new EditorDrawTabletUI(this, mContext, lp);
- mDrawString = mContext.getResources().getString(R.string.imageDraw).toUpperCase();
+ mDrawString = mContext.getResources().getString(R.string.imageDraw);
setMenuIcon(true);
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorGrad.java b/src/com/android/gallery3d/filtershow/editors/EditorGrad.java
index 0591216..96b8dbd 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorGrad.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorGrad.java
@@ -51,8 +51,8 @@
private static final int MODE_BRIGHTNESS = FilterGradRepresentation.PARAM_BRIGHTNESS;
private static final int MODE_SATURATION = FilterGradRepresentation.PARAM_SATURATION;
private static final int MODE_CONTRAST = FilterGradRepresentation.PARAM_CONTRAST;
- private static final int ADD_ICON = R.drawable.ic_grad_add;
- private static final int DEL_ICON = R.drawable.ic_grad_del;
+ private static final int ADD_ICON = R.drawable.addspot;
+ private static final int DEL_ICON = R.drawable.delete;
private int mSliderMode = MODE_BRIGHTNESS;
ImageGrad mImageGrad;
ParamAdapter []mAdapters = new ParamAdapter[3];
@@ -215,7 +215,7 @@
if (mSliderMode != mMode) {
mSliderMode = mMode;
mEffectName = mContext.getResources().getString(getModeNameid(mMode));
- mEffectName = mEffectName.toUpperCase();
+// mEffectName = mEffectName.toUpperCase();
}
mTextView.setText(Integer.toString(value));
mView.invalidate();
@@ -311,7 +311,7 @@
return mEffectName;
}
int val = rep.getParameter(mSliderMode);
- return mEffectName.toUpperCase() + ((val > 0) ? " +" : " ") + val;
+ return mEffectName + ((val > 0) ? " +" : " ") + val;
}
private FilterGradRepresentation getGradRepresentation() {
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorPanel.java b/src/com/android/gallery3d/filtershow/editors/EditorPanel.java
index 5440992..a127ddf 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorPanel.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorPanel.java
@@ -27,6 +27,8 @@
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
+import android.widget.TextView;
+
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
import com.android.gallery3d.filtershow.history.HistoryManager;
@@ -80,39 +82,14 @@
return mMainView;
}
mMainView = (LinearLayout) inflater.inflate(R.layout.filtershow_editor_panel, null);
-
- View actionControl = mMainView.findViewById(R.id.panelAccessoryViewList);
+ //TextView mFilterText = (TextView) mMainView.findViewById(R.id.tvFilterName);
View editControl = mMainView.findViewById(R.id.controlArea);
- ImageButton cancelButton = (ImageButton) mMainView.findViewById(R.id.cancelFilter);
- ImageButton applyButton = (ImageButton) mMainView.findViewById(R.id.applyFilter);
- Button editTitle = (Button) mMainView.findViewById(R.id.applyEffect);
- cancelButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- cancelCurrentFilter();
- FilterShowActivity activity = (FilterShowActivity) getActivity();
- activity.backToMain();
- }
- });
-
Button toggleState = (Button) mMainView.findViewById(R.id.toggle_state);
mEditor = activity.getEditor(mEditorID);
if (mEditor != null) {
- mEditor.setUpEditorUI(actionControl, editControl, editTitle, toggleState);
+ mEditor.setUpEditorUI(editControl, toggleState);
mEditor.reflectCurrentFilter();
- if (mEditor.useUtilityPanel()) {
- mEditor.openUtilityPanel((LinearLayout) actionControl);
- }
}
- applyButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- FilterShowActivity activity = (FilterShowActivity) getActivity();
- mEditor.finalApplyCalled();
- activity.backToMain();
- }
- });
-
showImageStatePanel(activity.isShowingImageStatePanel());
return mMainView;
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
index ff84ba8..d77df71 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
@@ -41,7 +41,7 @@
public String calculateUserMessage(Context context, String effectName, Object parameterValue) {
String apply = context.getString(R.string.apply_effect);
apply += " " + effectName;
- return apply.toUpperCase();
+ return apply;
}
@Override
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorVignette.java b/src/com/android/gallery3d/filtershow/editors/EditorVignette.java
index 630a1a9..fb17ba7 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorVignette.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorVignette.java
@@ -128,7 +128,7 @@
}
mImageVignette.setRepresentation(rep);
- String text = mContext.getString(rep.getTextId()).toUpperCase();
+ String text = mContext.getString(rep.getTextId());
mFilterTitle.setText(text);
updateText();
}
diff --git a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
index c168657..8398c31 100644
--- a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
+++ b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
@@ -115,12 +115,12 @@
if (mShowParameter == SHOW_VALUE_INT & useCompact(context)) {
if (getLocalRepresentation() instanceof FilterBasicRepresentation) {
FilterBasicRepresentation interval = (FilterBasicRepresentation) getLocalRepresentation();
- apply += " " + effectName.toUpperCase() + " " + interval.getStateRepresentation();
+ apply += " " + effectName + " " + interval.getStateRepresentation();
} else {
- apply += " " + effectName.toUpperCase() + " " + parameterValue;
+ apply += " " + effectName + " " + parameterValue;
}
} else {
- apply += " " + effectName.toUpperCase();
+ apply += " " + effectName;
}
return apply;
}
@@ -172,11 +172,15 @@
if (param != null) {
control(param, editControl);
} else {
- mSeekBar = new SeekBar(editControl.getContext());
+ /*mSeekBar = new SeekBar(editControl.getContext());
LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
mSeekBar.setLayoutParams(lp);
- ((LinearLayout) editControl).addView(mSeekBar);
+ ((LinearLayout) editControl).addView(mSeekBar);*/
+ mSeekBar = (SeekBar) editControl.findViewById(R.id.primarySeekBar);
+ if (mSeekBar != null) {
+ mSeekBar.setVisibility(View.VISIBLE);
+ }
mSeekBar.setOnSeekBarChangeListener(this);
}
}
diff --git a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
index ba6fff3..3de93cf 100644
--- a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
+++ b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
@@ -380,8 +380,8 @@
};
int[] overlayId = {
- R.drawable.filtershow_dualcam_focus,
- R.drawable.filtershow_dualcam_halo
+ R.drawable.focus,
+ R.drawable.halo
};
String[] serializationNames = {
@@ -415,7 +415,7 @@
FilterDualCamSketchRepresentation sketch = new FilterDualCamSketchRepresentation(
context.getString(R.string.sketch), R.string.sketch);
- sketch.setOverlayId(R.drawable.filtershow_dualcam_sketch);
+ sketch.setOverlayId(R.drawable.sketch);
sketch.setOverlayOnly(true);
sketch.setSerializationName("DUAL_CAM_SKETCH");
mDualCam.add(sketch);
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterDualCamFusionRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterDualCamFusionRepresentation.java
index 0e3598b..8e38c25 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterDualCamFusionRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterDualCamFusionRepresentation.java
@@ -58,7 +58,7 @@
setEditorId(EditorDualCamFusion.ID);
setShowParameterValue(false);
setTextId(R.string.fusion);
- setOverlayId(R.drawable.filtershow_dualcam_fusion);
+ setOverlayId(R.drawable.fusion);
setOverlayOnly(true);
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilter.java b/src/com/android/gallery3d/filtershow/filters/ImageFilter.java
index 1d580c1..1a32e46 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilter.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilter.java
@@ -20,7 +20,6 @@
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.renderscript.Allocation;
-import android.graphics.Rect;
import android.widget.Toast;
import com.android.gallery3d.filtershow.imageshow.GeometryMathUtils;
@@ -93,13 +92,6 @@
.getGeometryFilters(), true, MasterImage.getImage().getOriginalBounds(), w, h);
}
- protected Matrix getImageToScreenMatrix(int imageWidth, int imageHeight, int viewWidth,
- int viewHeight) {
- Rect imageDimens = new Rect(0, 0, imageWidth, imageHeight);
- return GeometryMathUtils.getImageToScreenMatrix(getEnvironment().getImagePreset()
- .getGeometryFilters(), true, imageDimens, viewWidth, viewHeight);
- }
-
public void setEnvironment(FilterEnvironment environment) {
mEnvironment = environment;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java
index c019c1a..1e89f33 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamFusion.java
@@ -82,10 +82,8 @@
Rect originalBounds = MasterImage.getImage().getOriginalBounds();
int origW = originalBounds.width();
int origH = originalBounds.height();
- int w = bitmap.getWidth();
- int h = bitmap.getHeight();
- filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(w, h, BitmapCache.FILTERS);
+ filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(origW, origH, BitmapCache.FILTERS);
filteredBitmap.setHasAlpha(true);
boolean result = DualCameraNativeEngine.getInstance().getForegroundImg(point.x, point.y, filteredBitmap);
@@ -114,10 +112,12 @@
bitmap.setHasAlpha(true);
Canvas canvas = new Canvas(bitmap);
+ int w = bitmap.getWidth();
+ int h = bitmap.getHeight();
canvas.drawColor(0, PorterDuff.Mode.CLEAR);
if(getEnvironment().getImagePreset().getDoApplyGeometry()) {
- Matrix originalToScreen = getImageToScreenMatrix(w, h, w, h);
+ Matrix originalToScreen = getOriginalToScreenMatrix(w, h);
canvas.drawBitmap(filteredBitmap, originalToScreen, null);
} else {
canvas.drawBitmap(filteredBitmap, null, new Rect(0,0,w,h), null);
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java
index 2547739..6907fe3 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamSketch.java
@@ -78,10 +78,8 @@
Rect originalBounds = MasterImage.getImage().getOriginalBounds();
int origW = originalBounds.width();
int origH = originalBounds.height();
- int w = bitmap.getWidth();
- int h = bitmap.getHeight();
- filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(w, h, BitmapCache.FILTERS);
+ filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(origW, origH, BitmapCache.FILTERS);
result = DualCameraNativeEngine.getInstance().applySketch(point.x, point.y, filteredBitmap);
@@ -107,9 +105,10 @@
}
Canvas canvas = new Canvas(bitmap);
-
+ int w = bitmap.getWidth();
+ int h = bitmap.getHeight();
if(getEnvironment().getImagePreset().getDoApplyGeometry()) {
- Matrix originalToScreen = getImageToScreenMatrix(w, h, w, h);
+ Matrix originalToScreen = getOriginalToScreenMatrix(w, h);
canvas.drawBitmap(filteredBitmap, originalToScreen, mPaint);
} else {
canvas.drawBitmap(filteredBitmap, null, new Rect(0,0,w,h), mPaint);
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java
index af1531a..dce31c3 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterDualCamera.java
@@ -81,10 +81,8 @@
Rect originalBounds = MasterImage.getImage().getOriginalBounds();
int origW = originalBounds.width();
int origH = originalBounds.height();
- int w = bitmap.getWidth();
- int h = bitmap.getHeight();
- filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(w, h, BitmapCache.FILTERS);
+ filteredBitmap = MasterImage.getImage().getBitmapCache().getBitmap(origW, origH, BitmapCache.FILTERS);
boolean result = false;
@@ -122,9 +120,10 @@
}
Canvas canvas = new Canvas(bitmap);
-
+ int w = bitmap.getWidth();
+ int h = bitmap.getHeight();
if(getEnvironment().getImagePreset().getDoApplyGeometry()) {
- Matrix originalToScreen = getImageToScreenMatrix(w, h, w, h);
+ Matrix originalToScreen = getOriginalToScreenMatrix(w, h);
canvas.drawBitmap(filteredBitmap, originalToScreen, mPaint);
} else {
canvas.drawBitmap(filteredBitmap, null, new Rect(0,0,w,h), mPaint);
diff --git a/src/com/android/gallery3d/filtershow/history/HistoryManager.java b/src/com/android/gallery3d/filtershow/history/HistoryManager.java
index 9d5065a..216bb1e 100644
--- a/src/com/android/gallery3d/filtershow/history/HistoryManager.java
+++ b/src/com/android/gallery3d/filtershow/history/HistoryManager.java
@@ -25,10 +25,13 @@
private static final String LOGTAG = "HistoryManager";
private Vector<HistoryItem> mHistoryItems = new Vector<HistoryItem>();
+ private Vector<HistoryItem> mHistoryItemsActiveFilter = new Vector<HistoryItem>();
private int mCurrentPresetPosition = 0;
+ private int mComparePresetPosition = 0;
private MenuItem mUndoMenuItem = null;
private MenuItem mRedoMenuItem = null;
private MenuItem mResetMenuItem = null;
+ private int mActiveFilter = -1;
public void setMenuItems(MenuItem undoItem, MenuItem redoItem, MenuItem resetItem) {
mUndoMenuItem = undoItem;
@@ -128,6 +131,7 @@
public void addHistoryItem(HistoryItem preset) {
insert(preset, 0);
+ insertActiveFilter(preset, 0);
updateMenuItems();
}
@@ -170,4 +174,46 @@
return mCurrentPresetPosition;
}
+ public int backToOriginal() {
+ saveComparePresetPosition();
+ mCurrentPresetPosition = getCount() - 1;
+ return mCurrentPresetPosition;
+ }
+
+ public int backToCurrent() {
+ mCurrentPresetPosition = getCurrentPresetPosition();
+ return mCurrentPresetPosition;
+ }
+ public int setActiveFilter(int value)
+ {
+ mActiveFilter = value;
+ return mActiveFilter;
+ }
+ private void insertActiveFilter(HistoryItem preset, int position)
+ {
+ mHistoryItemsActiveFilter.add(preset);
+ }
+ public void resetActiveFilter()
+ {
+ mHistoryItemsActiveFilter.clear();
+ }
+ public int undoCurrentFilter()
+ {
+ mCurrentPresetPosition = mCurrentPresetPosition + mHistoryItemsActiveFilter.size();
+ if (mCurrentPresetPosition >= getCount()) {
+ mCurrentPresetPosition = getCount() - 1;
+ }
+ updateMenuItems();
+ return mCurrentPresetPosition;
+ }
+
+ public void saveComparePresetPosition()
+ {
+ mComparePresetPosition = mCurrentPresetPosition ;
+ }
+ public int getCurrentPresetPosition()
+ {
+ return mComparePresetPosition;
+ }
+
}
diff --git a/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java b/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java
index 614b648..958170c 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/GeometryMathUtils.java
@@ -446,6 +446,9 @@
bw = bitmapHeight;
}
float scale = GeometryMathUtils.scale(bw, bh, viewWidth, viewHeight);
+ if (scale > 3.0f) {
+ scale = 3.0f;
+ }
scale *= SHOW_SCALE;
float s = Math.min(viewWidth / (float) bitmapWidth, viewHeight / (float) bitmapHeight);
Matrix m = getFullGeometryMatrix(holder, bitmapWidth, bitmapHeight);
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java b/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java
index 4e53f82..6f0268f 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java
@@ -261,6 +261,7 @@
if (!mValidDraw || bitmap == null) {
return;
}
+ toggleComparisonButtonVisibility();
forceStateConsistency();
mImageBounds.set(0, 0, bitmap.getWidth(), bitmap.getHeight());
// If display matrix doesn't exist, create it and its dependencies
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageMirror.java b/src/com/android/gallery3d/filtershow/imageshow/ImageMirror.java
index 26c49b1..acc0e4d 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageMirror.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageMirror.java
@@ -66,6 +66,7 @@
if (image == null) {
return;
}
+ toggleComparisonButtonVisibility();
GeometryMathUtils.initializeHolder(mDrawHolder, mLocalRep);
GeometryMathUtils.drawTransformedCropped(mDrawHolder, canvas, image, getWidth(),
getHeight());
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageRotate.java b/src/com/android/gallery3d/filtershow/imageshow/ImageRotate.java
index 5186c09..a620847 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageRotate.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageRotate.java
@@ -70,6 +70,7 @@
if (image == null) {
return;
}
+ toggleComparisonButtonVisibility();
GeometryMathUtils.initializeHolder(mDrawHolder, mLocalRep);
GeometryMathUtils.drawTransformedCropped(mDrawHolder, canvas, image, canvas.getWidth(),
canvas.getHeight());
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
index 9ca143f..261d43f 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
@@ -44,6 +44,7 @@
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
+import android.widget.ImageButton;
import android.widget.LinearLayout;
import com.android.gallery3d.R;
@@ -124,6 +125,7 @@
private Paint mMaskPaint = new Paint();
private Matrix mShaderMatrix = new Matrix();
private boolean mDidStartAnimation = false;
+ private boolean isScalingUpAllowed = true;
private static Bitmap convertToAlphaMask(Bitmap b) {
Bitmap a = Bitmap.createBitmap(b.getWidth(), b.getHeight(), Bitmap.Config.ALPHA_8);
@@ -324,7 +326,7 @@
}
// drawHighresImage(canvas, fullHighres);
- drawCompareImage(canvas, getGeometryOnlyImage());
+ //drawCompareImage(canvas, getGeometryOnlyImage());
canvas.restore();
@@ -1031,4 +1033,29 @@
return false;
}
+ public void scaleImage(boolean isScaled, Context context) {
+ float scale = 1.0f;
+ Bitmap bitmap = MasterImage.getImage().getOriginalBitmapLarge();
+ int bitmapWidth = bitmap.getWidth();
+ int bitmapheight = bitmap.getHeight();
+
+// int width = MasterImage.getImage().getOriginalBounds().width();
+// int height = MasterImage.getImage().getOriginalBounds().height();
+ int width = getWidth();
+ int height = getHeight();
+ int scaledWidth = context.getResources().getDimensionPixelSize(R.dimen.scaled_image_width);
+ int scaledHeight = context.getResources().getDimensionPixelSize(R.dimen.scaled_image_height);
+ if (isScaled) {
+ scale = (float) scaledHeight / height ;
+ }
+ MasterImage.getImage().setScaleFactor(scale);
+
+ invalidate();
+ }
+
+ public void toggleComparisonButtonVisibility()
+ {
+ mActivity.toggleComparisonButtonVisibility();
+ }
+
}
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java b/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
index 4742f2e..829af18 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
@@ -223,6 +223,9 @@
ih = imageHeight;
}
float scale = GeometryMathUtils.scale(iw, ih, viewWidth, viewHeight);
+ if (scale > 3.0f) {
+ scale = 3.0f;
+ }
scale *= GeometryMathUtils.SHOW_SCALE;
GeometryMathUtils.scaleRect(tmp, scale);
getUntranslatedStraightenCropBounds(tmp, mAngle);
diff --git a/src/com/android/gallery3d/ui/AbstractSlotRenderer.java b/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
index 63bcbea..e9190e3 100644
--- a/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
+++ b/src/com/android/gallery3d/ui/AbstractSlotRenderer.java
@@ -35,15 +35,17 @@
private final NinePatchTexture mFramePressed;
private final NinePatchTexture mFrameSelected;
private final ResourceTexture mDrmIcon;
+ private final ResourceTexture mSelectionIcon;
private FadeOutTexture mFramePressedUp;
protected AbstractSlotRenderer(Context context) {
mVideoOverlay = new ResourceTexture(context, R.drawable.ic_video_thumb);
- mVideoPlayIcon = new ResourceTexture(context, R.drawable.ic_gallery_play);
+ mVideoPlayIcon = new ResourceTexture(context, R.drawable.play_detail);
mPanoramaIcon = new ResourceTexture(context, R.drawable.ic_360pano_holo_light);
mFramePressed = new NinePatchTexture(context, R.drawable.grid_pressed);
mFrameSelected = new NinePatchTexture(context, R.drawable.grid_selected);
mDrmIcon = new ResourceTexture(context, R.drawable.drm_image);
+ mSelectionIcon = new ResourceTexture(context, R.drawable.multiselect);
}
protected void drawContent(GLCanvas canvas,
@@ -52,7 +54,7 @@
// The content is always rendered in to the largest square that fits
// inside the slot, aligned to the top of the slot.
- width = height = Math.min(width, height);
+ //width = height = Math.min(width, height);
if (rotation != 0) {
canvas.translate(width / 2, height / 2);
canvas.rotate(rotation, 0, 0, 1);
@@ -69,20 +71,18 @@
canvas.restore();
}
- protected void drawVideoOverlay(GLCanvas canvas, int width, int height) {
+ protected void drawVideoOverlay(GLCanvas canvas, int width, int height,
+ boolean isGridViewShown, int thumbSize) {
// Scale the video overlay to the height of the thumbnail and put it
// on the left side.
- ResourceTexture v = mVideoOverlay;
- float scale = (float) height / v.getHeight();
- int w = Math.round(scale * v.getWidth());
- int h = Math.round(scale * v.getHeight());
- v.draw(canvas, 0, 0, w, h);
-
- int s = Math.min(width, height) / 6;
- mVideoPlayIcon.draw(canvas, (width - s) / 2, (height - s) / 2, s, s);
+ int side = Math.min(width, height) / 6;
+ if (!isGridViewShown)
+ width = thumbSize;
+ mVideoPlayIcon.draw(canvas, (width - side) / 2, (height - side) / 2, side, side);
}
- protected void drawDrmOverlay(GLCanvas canvas, int width, int height, int Drm_mediaType) {
+ protected void drawDrmOverlay(GLCanvas canvas, int width, int height, int Drm_mediaType,
+ boolean isGridViewShown, int thumbSize) {
// Scale the video overlay to the height of the thumbnail and put it on the left side.
if (Drm_mediaType == MediaObject.MEDIA_TYPE_DRM_VIDEO) {
ResourceTexture v = mVideoOverlay;
@@ -92,11 +92,18 @@
v.draw(canvas, 0, 0, w, h);
}
int side = Math.min(width, height) / 6;
+ if (!isGridViewShown) {
+ width = thumbSize;
+ }
mDrmIcon.draw(canvas, (width - side) / 2, (height - side) / 2, side, side);
}
- protected void drawPanoramaIcon(GLCanvas canvas, int width, int height) {
+ protected void drawPanoramaIcon(GLCanvas canvas, int width, int height,
+ boolean isGridViewShown, int thumbSize) {
int iconSize = Math.min(width, height) / 6;
+ if (!isGridViewShown) {
+ width = thumbSize;
+ }
mPanoramaIcon.draw(canvas, (width - iconSize) / 2, (height - iconSize) / 2,
iconSize, iconSize);
}
@@ -124,7 +131,8 @@
}
protected void drawSelectedFrame(GLCanvas canvas, int width, int height) {
- drawFrame(canvas, mFrameSelected.getPaddings(), mFrameSelected, 0, 0, width, height);
+ mSelectionIcon.draw(canvas,15,15);
+ //drawFrame(canvas, mFrameSelected.getPaddings(), mFrameSelected, 0, 0, width, height);
}
protected static void drawFrame(GLCanvas canvas, Rect padding, Texture frame,
diff --git a/src/com/android/gallery3d/ui/ActionModeHandler.java b/src/com/android/gallery3d/ui/ActionModeHandler.java
index 080b6af..3ff8ed2 100644
--- a/src/com/android/gallery3d/ui/ActionModeHandler.java
+++ b/src/com/android/gallery3d/ui/ActionModeHandler.java
@@ -31,6 +31,7 @@
import android.view.View;
import android.widget.Button;
import android.widget.ShareActionProvider;
+import android.widget.Toolbar;
import android.widget.ShareActionProvider.OnShareTargetSelectedListener;
import com.android.gallery3d.R;
@@ -80,6 +81,7 @@
private final Handler mMainHandler;
private ActionMode mActionMode;
private boolean mShareMaxDialog = false;
+ private Toolbar mToolbar;
private static class GetAllPanoramaSupports implements PanoramaSupportCallback {
private int mNumInfoRequired;
@@ -131,11 +133,13 @@
mMenuExecutor = new MenuExecutor(activity, selectionManager);
mMainHandler = new Handler(activity.getMainLooper());
mNfcAdapter = NfcAdapter.getDefaultAdapter(mActivity.getAndroidContext());
+ mToolbar = mActivity.getToolbar();
}
public void startActionMode() {
Activity a = mActivity;
- mActionMode = a.startActionMode(this);
+// mActionMode = a.startActionMode(this);
+ mActionMode = mActivity.getToolbar().startActionMode(this);
View customView = LayoutInflater.from(a).inflate(
R.layout.action_mode, null);
mActionMode.setCustomView(customView);
@@ -238,6 +242,7 @@
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
mode.getMenuInflater().inflate(R.menu.operation, menu);
+ mActivity.getToolbar().setVisibility(View.INVISIBLE);
mMenu = menu;
mSharePanoramaMenuItem = menu.findItem(R.id.action_share_panorama);
@@ -262,6 +267,8 @@
@Override
public void onDestroyActionMode(ActionMode mode) {
mSelectionManager.leaveSelectionMode();
+ mActivity.getToolbar().setVisibility(View.VISIBLE);
+
}
private ArrayList<MediaObject> getSelectedMediaObjects(JobContext jc) {
@@ -279,7 +286,6 @@
}
selected.add(manager.getMediaObject(path));
}
-
return selected;
}
// Menu options are determined by selection set itself.
@@ -401,9 +407,7 @@
// Disable share actions until share intent is in good shape
if (mSharePanoramaMenuItem != null) mSharePanoramaMenuItem.setEnabled(false);
- if (mShareMenuItem != null && mSelectionManager.inSelectAllMode()) {
- mShareMenuItem.setVisible(false);
- }
+ if (mShareMenuItem != null) mShareMenuItem.setEnabled(false);
// Generate sharing intent and update supported operations in the background
// The task can take a long time and be canceled in the mean time.
@@ -489,7 +493,7 @@
mShareMaxDialog = false;
}
- mShareMenuItem.setVisible(canShare);
+ mShareMenuItem.setEnabled(canShare);
mShareActionProvider.setShareIntent(share_intent);
}
}
diff --git a/src/com/android/gallery3d/ui/AlbumLabelMaker.java b/src/com/android/gallery3d/ui/AlbumLabelMaker.java
index 3ac3bb7..20e4a2d 100644
--- a/src/com/android/gallery3d/ui/AlbumLabelMaker.java
+++ b/src/com/android/gallery3d/ui/AlbumLabelMaker.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution
+ *
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,18 +41,19 @@
public class AlbumLabelMaker {
private static final int BORDER_SIZE = 0;
- private final AlbumSetSlotRenderer.LabelSpec mSpec;
- private final TextPaint mTitlePaint;
- private final TextPaint mCountPaint;
+ private AlbumSetSlotRenderer.LabelSpec mSpec;
+ private AlbumSlotRenderer.LabelSpec mAlbumListSpec;
+ private TextPaint mTitlePaint;
+ private TextPaint mCountPaint;
private final Context mContext;
private int mLabelWidth;
private int mBitmapWidth;
private int mBitmapHeight;
- private final LazyLoadedBitmap mLocalSetIcon;
+ /*private final LazyLoadedBitmap mLocalSetIcon;
private final LazyLoadedBitmap mPicasaIcon;
- private final LazyLoadedBitmap mCameraIcon;
+ private final LazyLoadedBitmap mCameraIcon;*/
public AlbumLabelMaker(Context context, AlbumSetSlotRenderer.LabelSpec spec) {
mContext = context;
@@ -57,16 +61,22 @@
mTitlePaint = getTextPaint(spec.titleFontSize, spec.titleColor, false);
mCountPaint = getTextPaint(spec.countFontSize, spec.countColor, false);
- mLocalSetIcon = new LazyLoadedBitmap(R.drawable.frame_overlay_gallery_folder);
+ /*mLocalSetIcon = new LazyLoadedBitmap(R.drawable.frame_overlay_gallery_folder);
mPicasaIcon = new LazyLoadedBitmap(R.drawable.frame_overlay_gallery_picasa);
- mCameraIcon = new LazyLoadedBitmap(R.drawable.frame_overlay_gallery_camera);
+ mCameraIcon = new LazyLoadedBitmap(R.drawable.frame_overlay_gallery_camera);*/
+ }
+
+ public AlbumLabelMaker(Context context, AlbumSlotRenderer.LabelSpec spec) {
+ mContext = context;
+ mAlbumListSpec = spec;
+ mTitlePaint = getTextPaint(spec.titleFontSize, spec.titleColor, false);
}
public static int getBorderSize() {
return BORDER_SIZE;
}
- private Bitmap getOverlayAlbumIcon(int sourceType) {
+ /*private Bitmap getOverlayAlbumIcon(int sourceType) {
switch (sourceType) {
case DataSourceType.TYPE_CAMERA:
return mCameraIcon.get();
@@ -76,13 +86,14 @@
return mPicasaIcon.get();
}
return null;
- }
+ }*/
private static TextPaint getTextPaint(int textSize, int color, boolean isBold) {
TextPaint paint = new TextPaint();
paint.setTextSize(textSize);
paint.setAntiAlias(true);
paint.setColor(color);
+ paint.setTypeface(Typeface.SANS_SERIF);
//paint.setShadowLayer(2f, 0f, 0f, Color.LTGRAY);
if (isBold) {
paint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
@@ -109,12 +120,16 @@
}
}
- public synchronized void setLabelWidth(int width) {
+ public synchronized void setLabelWidth(int width, String key) {
if (mLabelWidth == width) return;
mLabelWidth = width;
int borders = 2 * BORDER_SIZE;
mBitmapWidth = width + borders;
- mBitmapHeight = mSpec.labelBackgroundHeight + borders;
+ if (key.equalsIgnoreCase(AlbumSetSlidingWindow.KEY_ALBUM)) {
+ mBitmapHeight = mSpec.labelBackgroundHeight + borders;
+ } else {
+ mBitmapHeight = mAlbumListSpec.labelBackgroundHeight + borders;
+ }
}
public ThreadPool.Job<Bitmap> requestLabel(
@@ -122,6 +137,10 @@
return new AlbumLabelJob(title, count, sourceType);
}
+ public ThreadPool.Job<Bitmap> requestLabel(String title) {
+ return new AlbumLabelJob(title);
+ }
+
static void drawText(Canvas canvas,
int x, int y, String text, int lengthLimit, TextPaint p) {
// The TextPaint cannot be used concurrently
@@ -134,8 +153,9 @@
private class AlbumLabelJob implements ThreadPool.Job<Bitmap> {
private final String mTitle;
- private final String mCount;
- private final int mSourceType;
+ private String mCount;
+ private int mSourceType;
+ private boolean isAlbumListViewShown;
public AlbumLabelJob(String title, String count, int sourceType) {
mTitle = title;
@@ -143,13 +163,20 @@
mSourceType = sourceType;
}
+ public AlbumLabelJob(String title) {
+ mTitle = title;
+ isAlbumListViewShown = true;
+
+ }
+
@Override
public Bitmap run(JobContext jc) {
AlbumSetSlotRenderer.LabelSpec s = mSpec;
+ AlbumSlotRenderer.LabelSpec s1 = mAlbumListSpec;
String title = mTitle;
String count = mCount;
- Bitmap icon = getOverlayAlbumIcon(mSourceType);
+ //Bitmap icon = getOverlayAlbumIcon(mSourceType);
Bitmap bitmap;
int labelWidth;
@@ -159,17 +186,27 @@
bitmap = GalleryBitmapPool.getInstance().get(mBitmapWidth, mBitmapHeight);
}
- if (bitmap == null) {
- int borders = 2 * BORDER_SIZE;
+ int borders = 2 * BORDER_SIZE;
+ if (!isAlbumListViewShown) {
+ if (bitmap == null) {
+
+ bitmap = Bitmap
+ .createBitmap(labelWidth + borders,
+ s.labelBackgroundHeight + borders,
+ Config.ARGB_8888);
+ }
+ } else {
bitmap = Bitmap.createBitmap(labelWidth + borders,
- s.labelBackgroundHeight + borders, Config.ARGB_8888);
+ s1.labelBackgroundHeight + borders, Config.ARGB_8888);
}
Canvas canvas = new Canvas(bitmap);
canvas.clipRect(BORDER_SIZE, BORDER_SIZE,
bitmap.getWidth() - BORDER_SIZE,
bitmap.getHeight() - BORDER_SIZE);
- canvas.drawColor(mSpec.backgroundColor, PorterDuff.Mode.SRC);
+ if (!isAlbumListViewShown) {
+ canvas.drawColor(mSpec.backgroundColor, PorterDuff.Mode.SRC);
+ }
canvas.translate(BORDER_SIZE, BORDER_SIZE);
@@ -178,57 +215,59 @@
// draw title
if (jc.isCancelled()) return null;
int strLength = (int) mTitlePaint.measureText(title);
- int x = labelWidth - (s.leftMargin + s.iconSize) - strLength;
+ if (!isAlbumListViewShown) {
+ int x = labelWidth - s.leftMargin - strLength;
// TODO: is the offset relevant in new reskin?
// int y = s.titleOffset;
int y = (s.labelBackgroundHeight - s.titleFontSize) / 2;
- drawText(canvas, x, y, title, labelWidth - s.leftMargin - x -
- s.titleRightMargin, mTitlePaint);
+ drawText(canvas, x, y, title, labelWidth - s.leftMargin - x, mTitlePaint);
// draw count
if (jc.isCancelled()) return null;
- x = s.leftMargin + 10;// plus 10 to get a much bigger margin
+ x = s.leftMargin + 10 - s.titleRightMargin;// plus 10 to get a much bigger margin
y = (s.labelBackgroundHeight - s.countFontSize) / 2;
drawText(canvas, x, y, count,
labelWidth - x, mCountPaint);
- // draw the icon
- if (icon != null) {
- if (jc.isCancelled()) return null;
- float scale = (float) s.iconSize / icon.getWidth();
- canvas.translate(labelWidth - s.leftMargin - s.iconSize,
- (s.labelBackgroundHeight -
- Math.round(scale * icon.getHeight())) / 2f);
- canvas.scale(scale, scale);
- canvas.drawBitmap(icon, 0, 0, null);
+ } else {
+ int x = labelWidth
+ - (s1.leftMargin + s1.iconSize)
+ - strLength;
+ // TODO: is the offset relevant in new reskin?
+ // int y = s.titleOffset;
+ int y = (s1.labelBackgroundHeight - s1.titleFontSize) / 2;
+ drawText(canvas, x, y, title, labelWidth - s1.leftMargin
+ - x, mTitlePaint);
}
+
} else { // LTR
- // draw title
- if (jc.isCancelled()) return null;
- int x = s.leftMargin + s.iconSize;
- // TODO: is the offset relevant in new reskin?
- // int y = s.titleOffset;
- int y = (s.labelBackgroundHeight - s.titleFontSize) / 2;
- drawText(canvas, x, y, title, labelWidth - s.leftMargin - x -
- s.titleRightMargin, mTitlePaint);
+ // draw title
+ if (jc.isCancelled())
+ return null;
+ if (!isAlbumListViewShown) {
+ int x = s.leftMargin + s.titleLeftMargin;
+ // TODO: is the offset relevant in new reskin?
+ // int y = s.titleOffset;
+ int y = (s.labelBackgroundHeight - s.titleFontSize) / 2;
+ drawText(canvas, x, y, title, labelWidth - s.leftMargin - x
+ - s.titleRightMargin - s.countRightMargin, mTitlePaint);
- // draw count
- if (jc.isCancelled()) return null;
- x = labelWidth - s.titleRightMargin;
- y = (s.labelBackgroundHeight - s.countFontSize) / 2;
- drawText(canvas, x, y, count,
- labelWidth - x, mCountPaint);
+ // draw count
+ if (jc.isCancelled())
+ return null;
+ x = labelWidth - s.titleRightMargin - s.countRightMargin;
+ y = (s.labelBackgroundHeight - s.countFontSize) / 2;
+ drawText(canvas, x, y, count, labelWidth - x, mCountPaint);
+ } else {
- // draw the icon
- if (icon != null) {
- if (jc.isCancelled()) return null;
- float scale = (float) s.iconSize / icon.getWidth();
- canvas.translate(s.leftMargin, (s.labelBackgroundHeight -
- Math.round(scale * icon.getHeight())) / 2f);
- canvas.scale(scale, scale);
- canvas.drawBitmap(icon, 0, 0, null);
+ int x = s1.leftMargin + s1.iconSize;
+ // TODO: is the offset relevant in new reskin?
+ // int y = s.titleOffset;
+ int y = (s1.labelBackgroundHeight - s1.titleFontSize) / 2;
+
+ drawText(canvas, x, y, title, labelWidth - s1.leftMargin
+ - x, mTitlePaint);
}
- }
-
+ }
return bitmap;
}
}
diff --git a/src/com/android/gallery3d/ui/AlbumSetSlidingWindow.java b/src/com/android/gallery3d/ui/AlbumSetSlidingWindow.java
index 8149df4..8dd1496 100644
--- a/src/com/android/gallery3d/ui/AlbumSetSlidingWindow.java
+++ b/src/com/android/gallery3d/ui/AlbumSetSlidingWindow.java
@@ -39,6 +39,7 @@
public class AlbumSetSlidingWindow implements AlbumSetDataLoader.DataListener {
private static final String TAG = "AlbumSetSlidingWindow";
private static final int MSG_UPDATE_ALBUM_ENTRY = 1;
+ public static final String KEY_ALBUM = "AlbumSet";
public static interface Listener {
public void onSizeChanged(int size);
@@ -527,7 +528,7 @@
mSlotWidth = width;
mLoadingLabel = null;
- mLabelMaker.setLabelWidth(mSlotWidth);
+ mLabelMaker.setLabelWidth(mSlotWidth,KEY_ALBUM);
if (!mIsActive) return;
diff --git a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java
index 46daf14..5c817e6 100644
--- a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java
+++ b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java
@@ -58,11 +58,13 @@
public int countFontSize;
public int leftMargin;
public int iconSize;
+ public int titleLeftMargin;
public int titleRightMargin;
public int backgroundColor;
public int titleColor;
public int countColor;
public int borderSize;
+ public int countRightMargin;
}
public AlbumSetSlotRenderer(AbstractGalleryActivity activity,
diff --git a/src/com/android/gallery3d/ui/AlbumSlidingWindow.java b/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
index fec7d1e..f0540b1 100644
--- a/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
+++ b/src/com/android/gallery3d/ui/AlbumSlidingWindow.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution
+ *
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,17 +19,28 @@
package com.android.gallery3d.ui;
+import android.content.res.Configuration;
import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.Bitmap.Config;
import android.os.Message;
+import android.text.TextPaint;
+import android.text.TextUtils;
import com.android.gallery3d.app.AbstractGalleryActivity;
import com.android.gallery3d.app.AlbumDataLoader;
+import com.android.gallery3d.app.AlbumPage;
import com.android.gallery3d.common.Utils;
import com.android.gallery3d.data.MediaItem;
import com.android.gallery3d.data.MediaObject;
import com.android.gallery3d.data.MediaObject.PanoramaSupportCallback;
import com.android.gallery3d.data.Path;
+import com.android.gallery3d.glrenderer.BitmapTexture;
import com.android.gallery3d.glrenderer.Texture;
+import com.android.gallery3d.glrenderer.TextureUploader;
import com.android.gallery3d.glrenderer.TiledTexture;
import com.android.gallery3d.util.Future;
import com.android.gallery3d.util.FutureListener;
@@ -38,14 +52,18 @@
private static final int MSG_UPDATE_ENTRY = 0;
private static final int JOB_LIMIT = 2;
+ private static final int MSG_UPDATE_ALBUM_ENTRY = 1;
+ public static final String KEY_ALBUM = "Album";
public static interface Listener {
public void onSizeChanged(int size);
+
public void onContentChanged();
}
public static class AlbumEntry {
public MediaItem item;
+ public String name; // For title of image
public Path path;
public boolean isPanorama;
public int rotation;
@@ -55,6 +73,9 @@
public Texture content;
private BitmapLoader contentLoader;
private PanoSupportListener mPanoSupportListener;
+ public BitmapTexture labelTexture;
+ private BitmapLoader labelLoader;
+
}
private final AlbumDataLoader mSource;
@@ -75,36 +96,64 @@
private int mActiveRequestCount = 0;
private boolean mIsActive = false;
+ private AlbumLabelMaker mLabelMaker;
+ private int mSlotWidth;
+ private BitmapTexture mLoadingLabel;
+ private TextureUploader mLabelUploader;
+ private int mCurrentView;
+ private AbstractGalleryActivity mActivity;
+ private boolean isSlotSizeChanged;
+ private boolean mViewType;
private class PanoSupportListener implements PanoramaSupportCallback {
public final AlbumEntry mEntry;
- public PanoSupportListener (AlbumEntry entry) {
+
+ public PanoSupportListener(AlbumEntry entry) {
mEntry = entry;
}
+
@Override
- public void panoramaInfoAvailable(MediaObject mediaObject, boolean isPanorama,
- boolean isPanorama360) {
- if (mEntry != null) mEntry.isPanorama = isPanorama;
+ public void panoramaInfoAvailable(MediaObject mediaObject,
+ boolean isPanorama, boolean isPanorama360) {
+ if (mEntry != null)
+ mEntry.isPanorama = isPanorama;
}
}
public AlbumSlidingWindow(AbstractGalleryActivity activity,
- AlbumDataLoader source, int cacheSize) {
+ AlbumDataLoader source, int cacheSize,
+ AlbumSlotRenderer.LabelSpec labelSpec, boolean viewType) {
source.setDataListener(this);
mSource = source;
+ mViewType = viewType;
mData = new AlbumEntry[cacheSize];
mSize = source.size();
-
mHandler = new SynchronizedHandler(activity.getGLRoot()) {
@Override
public void handleMessage(Message message) {
- Utils.assertTrue(message.what == MSG_UPDATE_ENTRY);
- ((ThumbnailLoader) message.obj).updateEntry();
+ switch (message.what) {
+ case 0:
+ Utils.assertTrue(message.what == MSG_UPDATE_ENTRY);
+ ((ThumbnailLoader) message.obj).updateEntry();
+ break;
+ case 1:
+ Utils.assertTrue(message.what == MSG_UPDATE_ALBUM_ENTRY);
+ ((EntryUpdater) message.obj).updateEntry();
+ break;
+ }
+
}
};
mThreadPool = new JobLimiter(activity.getThreadPool(), JOB_LIMIT);
+ if (!mViewType) {
+ mLabelMaker = new AlbumLabelMaker(activity.getAndroidContext(),
+ labelSpec);
+ mLabelUploader = new TextureUploader(activity.getGLRoot());
+ }
mTileUploader = new TiledTexture.Uploader(activity.getGLRoot());
+ mActivity = activity;
+
}
public void setListener(Listener listener) {
@@ -113,8 +162,8 @@
public AlbumEntry get(int slotIndex) {
if (!isActiveSlot(slotIndex)) {
- Utils.fail("invalid slot: %s outsides (%s, %s)",
- slotIndex, mActiveStart, mActiveEnd);
+ Utils.fail("invalid slot: %s outsides (%s, %s)", slotIndex,
+ mActiveStart, mActiveEnd);
}
return mData[slotIndex % mData.length];
}
@@ -124,7 +173,8 @@
}
private void setContentWindow(int contentStart, int contentEnd) {
- if (contentStart == mContentStart && contentEnd == mContentEnd) return;
+ if (contentStart == mContentStart && contentEnd == mContentEnd)
+ return;
if (!mIsActive) {
mContentStart = contentStart;
@@ -170,12 +220,13 @@
mActiveStart = start;
mActiveEnd = end;
- int contentStart = Utils.clamp((start + end) / 2 - data.length / 2,
- 0, Math.max(0, mSize - data.length));
+ int contentStart = Utils.clamp((start + end) / 2 - data.length / 2, 0,
+ Math.max(0, mSize - data.length));
int contentEnd = Math.min(contentStart + data.length, mSize);
setContentWindow(contentStart, contentEnd);
updateTextureUploadQueue();
- if (mIsActive) updateAllImageRequests();
+ if (mIsActive)
+ updateAllImageRequests();
}
private void uploadBgTextureInSlot(int index) {
@@ -184,12 +235,21 @@
if (entry.bitmapTexture != null) {
mTileUploader.addTexture(entry.bitmapTexture);
}
+ if (!mViewType) {
+ if (entry.labelTexture != null) {
+ mLabelUploader.addBgTexture(entry.labelTexture);
+ }
+ }
}
}
private void updateTextureUploadQueue() {
- if (!mIsActive) return;
+ if (!mIsActive)
+ return;
mTileUploader.clear();
+ if (!mViewType) {
+ mLabelUploader.clear();
+ }
// add foreground textures
for (int i = mActiveStart, n = mActiveEnd; i < n; ++i) {
@@ -197,11 +257,16 @@
if (entry.bitmapTexture != null) {
mTileUploader.addTexture(entry.bitmapTexture);
}
+ if (!mViewType) {
+ if (entry.labelTexture != null) {
+ mLabelUploader.addFgTexture(entry.labelTexture);
+ }
+ }
}
// add background textures
- int range = Math.max(
- (mContentEnd - mActiveEnd), (mActiveStart - mContentStart));
+ int range = Math.max((mContentEnd - mActiveEnd),
+ (mActiveStart - mContentStart));
for (int i = 0; i < range; ++i) {
uploadBgTextureInSlot(mActiveEnd + i);
uploadBgTextureInSlot(mActiveStart - i - 1);
@@ -209,54 +274,108 @@
}
// We would like to request non active slots in the following order:
- // Order: 8 6 4 2 1 3 5 7
- // |---------|---------------|---------|
- // |<- active ->|
- // |<-------- cached range ----------->|
+ // Order: 8 6 4 2 1 3 5 7
+ // |---------|---------------|---------|
+ // |<- active ->|
+ // |<-------- cached range ----------->|
private void requestNonactiveImages() {
- int range = Math.max(
- (mContentEnd - mActiveEnd), (mActiveStart - mContentStart));
- for (int i = 0 ;i < range; ++i) {
- requestSlotImage(mActiveEnd + i);
- requestSlotImage(mActiveStart - 1 - i);
+ int range = Math.max((mContentEnd - mActiveEnd),
+ (mActiveStart - mContentStart));
+ for (int i = 0; i < range; ++i) {
+ // requestSlotImage(mActiveEnd + i);
+ // requestSlotImage(mActiveStart - 1 - i);
+ requestImagesInSlot(mActiveEnd + i);
+ requestImagesInSlot(mActiveStart - 1 - i);
}
+ isSlotSizeChanged = false;
+ }
+
+ private void requestImagesInSlot(int slotIndex) {
+ if (slotIndex < mContentStart || slotIndex >= mContentEnd)
+ return;
+ AlbumEntry entry = mData[slotIndex % mData.length];
+ if (isSlotSizeChanged && !mViewType) {
+ if ((entry.content != null || entry.item == null)
+ && entry.labelTexture != null) {
+ return;
+
+ } else {
+ if (entry.labelLoader != null)
+ entry.labelLoader.startLoad();
+ }
+ } else {
+ if (entry.content != null || entry.item == null)
+ return;
+ entry.mPanoSupportListener = new PanoSupportListener(entry);
+ entry.item.getPanoramaSupport(entry.mPanoSupportListener);
+ if (entry.contentLoader != null)
+ entry.contentLoader.startLoad();
+ if (!mViewType) {
+
+ if (entry.labelLoader != null)
+ entry.labelLoader.startLoad();
+ }
+ }
+
}
// return whether the request is in progress or not
private boolean requestSlotImage(int slotIndex) {
- if (slotIndex < mContentStart || slotIndex >= mContentEnd) return false;
+ if (slotIndex < mContentStart || slotIndex >= mContentEnd)
+ return false;
AlbumEntry entry = mData[slotIndex % mData.length];
- if (entry.content != null || entry.item == null) return false;
+ if (entry.content != null || entry.item == null)
+ return false;
// Set up the panorama callback
entry.mPanoSupportListener = new PanoSupportListener(entry);
entry.item.getPanoramaSupport(entry.mPanoSupportListener);
- entry.contentLoader.startLoad();
return entry.contentLoader.isRequestInProgress();
}
+ private static boolean startLoadBitmap(BitmapLoader loader) {
+ if (loader == null)
+ return false;
+ loader.startLoad();
+ return loader.isRequestInProgress();
+ }
+
private void cancelNonactiveImages() {
- int range = Math.max(
- (mContentEnd - mActiveEnd), (mActiveStart - mContentStart));
- for (int i = 0 ;i < range; ++i) {
+ int range = Math.max((mContentEnd - mActiveEnd),
+ (mActiveStart - mContentStart));
+ for (int i = 0; i < range; ++i) {
cancelSlotImage(mActiveEnd + i);
cancelSlotImage(mActiveStart - 1 - i);
}
}
private void cancelSlotImage(int slotIndex) {
- if (slotIndex < mContentStart || slotIndex >= mContentEnd) return;
+ if (slotIndex < mContentStart || slotIndex >= mContentEnd)
+ return;
AlbumEntry item = mData[slotIndex % mData.length];
- if (item.contentLoader != null) item.contentLoader.cancelLoad();
+ if (item.contentLoader != null)
+ item.contentLoader.cancelLoad();
+ if (!mViewType) {
+ if (item.labelLoader != null)
+ item.labelLoader.cancelLoad();
+ }
}
private void freeSlotContent(int slotIndex) {
AlbumEntry data[] = mData;
int index = slotIndex % data.length;
AlbumEntry entry = data[index];
- if (entry.contentLoader != null) entry.contentLoader.recycle();
- if (entry.bitmapTexture != null) entry.bitmapTexture.recycle();
+ if (entry.contentLoader != null)
+ entry.contentLoader.recycle();
+ if (!mViewType) {
+ if (entry.labelLoader != null)
+ entry.labelLoader.recycle();
+ if (entry.labelTexture != null)
+ entry.labelTexture.recycle();
+ }
+ if (entry.bitmapTexture != null)
+ entry.bitmapTexture.recycle();
data[index] = null;
}
@@ -264,28 +383,63 @@
AlbumEntry entry = new AlbumEntry();
MediaItem item = mSource.get(slotIndex); // item could be null;
entry.item = item;
- entry.mediaType = (item == null)
- ? MediaItem.MEDIA_TYPE_UNKNOWN
+ entry.name = (item == null) ? null : item.getName();
+ entry.mediaType = (item == null) ? MediaItem.MEDIA_TYPE_UNKNOWN
: entry.item.getMediaType();
entry.path = (item == null) ? null : item.getPath();
entry.rotation = (item == null) ? 0 : item.getRotation();
entry.contentLoader = new ThumbnailLoader(slotIndex, entry.item);
+ if (!mViewType) {
+ if (entry.labelLoader != null) {
+ entry.labelLoader.recycle();
+ entry.labelLoader = null;
+ entry.labelTexture = null;
+ }
+ if (entry.name != null) {
+ entry.labelLoader = new AlbumLabelLoader(slotIndex, entry.name);
+ }
+ }
mData[slotIndex % mData.length] = entry;
}
private void updateAllImageRequests() {
mActiveRequestCount = 0;
for (int i = mActiveStart, n = mActiveEnd; i < n; ++i) {
- if (requestSlotImage(i)) ++mActiveRequestCount;
+ AlbumEntry entry = mData[i % mData.length];
+ if (isSlotSizeChanged) {
+ if ((entry.content != null || entry.item == null)
+ && entry.labelTexture != null) {
+ continue;
+ } else {
+ if (startLoadBitmap(entry.labelLoader))
+ ++mActiveRequestCount;
+ }
+
+ }
+
+ else {
+ if (entry.content != null || entry.item == null)
+ continue;
+ if (startLoadBitmap(entry.contentLoader))
+ ++mActiveRequestCount;
+ if (!mViewType) {
+ if (startLoadBitmap(entry.labelLoader))
+ ++mActiveRequestCount;
+ }
+ }
+
+ // if (requestSlotImage(i)) ++mActiveRequestCount;
}
- if (mActiveRequestCount == 0) {
+
+ if (isSlotSizeChanged || mActiveRequestCount == 0) {
requestNonactiveImages();
} else {
+
cancelNonactiveImages();
}
}
- private class ThumbnailLoader extends BitmapLoader {
+ private class ThumbnailLoader extends BitmapLoader {
private final int mSlotIndex;
private final MediaItem mItem;
@@ -307,7 +461,9 @@
public void updateEntry() {
Bitmap bitmap = getBitmap();
- if (bitmap == null) return; // error or recycled
+
+ if (bitmap == null)
+ return; // error or recycled
AlbumEntry entry = mData[mSlotIndex % mData.length];
entry.bitmapTexture = new TiledTexture(bitmap);
entry.content = entry.bitmapTexture;
@@ -315,8 +471,10 @@
if (isActiveSlot(mSlotIndex)) {
mTileUploader.addTexture(entry.bitmapTexture);
--mActiveRequestCount;
- if (mActiveRequestCount == 0) requestNonactiveImages();
- if (mListener != null) mListener.onContentChanged();
+ if (mActiveRequestCount == 0)
+ requestNonactiveImages();
+ if (mListener != null)
+ mListener.onContentChanged();
} else {
mTileUploader.addTexture(entry.bitmapTexture);
}
@@ -327,9 +485,12 @@
public void onSizeChanged(int size) {
if (mSize != size) {
mSize = size;
- if (mListener != null) mListener.onSizeChanged(mSize);
- if (mContentEnd > mSize) mContentEnd = mSize;
- if (mActiveEnd > mSize) mActiveEnd = mSize;
+ if (mListener != null)
+ mListener.onSizeChanged(mSize);
+ if (mContentEnd > mSize)
+ mContentEnd = mSize;
+ if (mActiveEnd > mSize)
+ mActiveEnd = mSize;
}
}
@@ -356,10 +517,88 @@
public void pause() {
mIsActive = false;
+ if (!mViewType)
+ mLabelUploader.clear();
mTileUploader.clear();
TiledTexture.freeResources();
for (int i = mContentStart, n = mContentEnd; i < n; ++i) {
freeSlotContent(i);
}
}
+
+ private static interface EntryUpdater {
+ public void updateEntry();
+ }
+
+ private class AlbumLabelLoader extends BitmapLoader implements EntryUpdater {
+ private final int mSlotIndex;
+ private final String mTitle;
+
+ public AlbumLabelLoader(int slotIndex, String title) {
+ mSlotIndex = slotIndex;
+ mTitle = title;
+ // mTotalCount = totalCount;
+ // mSourceType = sourceType;
+ }
+
+ @Override
+ protected Future<Bitmap> submitBitmapTask(FutureListener<Bitmap> l) {
+ return mThreadPool.submit(mLabelMaker.requestLabel(mTitle), this);
+ }
+
+ @Override
+ protected void onLoadComplete(Bitmap bitmap) {
+ mHandler.obtainMessage(MSG_UPDATE_ALBUM_ENTRY, this).sendToTarget();
+ }
+
+ @Override
+ public void updateEntry() {
+ Bitmap bitmap = getBitmap();
+ if (bitmap == null)
+ return; // Error or recycled
+
+ AlbumEntry entry = mData[mSlotIndex % mData.length];
+ entry.labelTexture = new BitmapTexture(bitmap);
+ entry.labelTexture.setOpaque(false);
+ // entry.labelTexture = texture;
+
+ if (isActiveSlot(mSlotIndex)) {
+ mLabelUploader.addFgTexture(entry.labelTexture);
+ --mActiveRequestCount;
+ if (mActiveRequestCount == 0)
+ requestNonactiveImages();
+ if (mListener != null)
+ mListener.onContentChanged();
+ } else {
+ mLabelUploader.addBgTexture(entry.labelTexture);
+ }
+ }
+ }
+
+ public void onSlotSizeChanged(int width, int height) {
+ if (mSlotWidth == width)
+ return;
+
+ isSlotSizeChanged = !mViewType ;
+ mSlotWidth = width;
+ mLoadingLabel = null;
+ mLabelMaker.setLabelWidth(mSlotWidth,KEY_ALBUM);
+
+ if (!mIsActive)
+ return;
+
+ for (int i = mContentStart, n = mContentEnd; i < n; ++i) {
+ AlbumEntry entry = mData[i % mData.length];
+ if (entry.labelLoader != null) {
+ entry.labelLoader.recycle();
+ entry.labelLoader = null;
+ entry.labelTexture = null;
+ }
+ if (entry.name != null) {
+ entry.labelLoader = new AlbumLabelLoader(i, entry.name);
+ }
+ }
+ updateAllImageRequests();
+ updateTextureUploadQueue();
+ }
}
diff --git a/src/com/android/gallery3d/ui/AlbumSlotRenderer.java b/src/com/android/gallery3d/ui/AlbumSlotRenderer.java
index 5c1441e..5d4898f 100644
--- a/src/com/android/gallery3d/ui/AlbumSlotRenderer.java
+++ b/src/com/android/gallery3d/ui/AlbumSlotRenderer.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution
+ *
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,6 +21,7 @@
import com.android.gallery3d.app.AbstractGalleryActivity;
import com.android.gallery3d.app.AlbumDataLoader;
+import com.android.gallery3d.app.AlbumPage;
import com.android.gallery3d.data.MediaObject;
import com.android.gallery3d.data.Path;
import com.android.gallery3d.glrenderer.ColorTexture;
@@ -25,10 +29,24 @@
import com.android.gallery3d.glrenderer.GLCanvas;
import com.android.gallery3d.glrenderer.Texture;
import com.android.gallery3d.glrenderer.TiledTexture;
+import com.android.gallery3d.glrenderer.UploadedTexture;
+import com.android.gallery3d.ui.AlbumSlidingWindow.AlbumEntry;
public class AlbumSlotRenderer extends AbstractSlotRenderer {
@SuppressWarnings("unused")
private static final String TAG = "AlbumView";
+ private boolean mIsGridViewShown;
+
+ public static class LabelSpec {
+ public int labelBackgroundHeight;
+ public int titleFontSize;
+ public int leftMargin;
+ public int iconSize;
+ public int titleLeftMargin;
+ public int backgroundColor;
+ public int titleColor;
+ public int borderSize;
+ }
public interface SlotFilter {
public boolean acceptSlot(int index);
@@ -40,7 +58,7 @@
private AlbumSlidingWindow mDataWindow;
private final AbstractGalleryActivity mActivity;
private final ColorTexture mWaitLoadingTexture;
- private final SlotView mSlotView;
+ private SlotView mSlotView;
private final SelectionManager mSelectionManager;
private int mPressedIndex = -1;
@@ -49,33 +67,40 @@
private boolean mInSelectionMode;
private SlotFilter mSlotFilter;
+ protected final LabelSpec mLabelSpec;
- public AlbumSlotRenderer(AbstractGalleryActivity activity, SlotView slotView,
- SelectionManager selectionManager, int placeholderColor) {
+ public AlbumSlotRenderer(AbstractGalleryActivity activity,
+ SlotView slotView, LabelSpec labelSpec,
+ SelectionManager selectionManager, int placeholderColor,
+ boolean viewType) {
super(activity);
mActivity = activity;
mSlotView = slotView;
mSelectionManager = selectionManager;
mPlaceholderColor = placeholderColor;
-
+ mLabelSpec = labelSpec;
mWaitLoadingTexture = new ColorTexture(mPlaceholderColor);
mWaitLoadingTexture.setSize(1, 1);
+ mIsGridViewShown = viewType;
}
public void setPressedIndex(int index) {
- if (mPressedIndex == index) return;
+ if (mPressedIndex == index)
+ return;
mPressedIndex = index;
mSlotView.invalidate();
}
public void setPressedUp() {
- if (mPressedIndex == -1) return;
+ if (mPressedIndex == -1)
+ return;
mAnimatePressedUp = true;
mSlotView.invalidate();
}
public void setHighlightItemPath(Path path) {
- if (mHighlightItemPath == path) return;
+ if (mHighlightItemPath == path)
+ return;
mHighlightItemPath = path;
mSlotView.invalidate();
}
@@ -87,22 +112,28 @@
mDataWindow = null;
}
if (model != null) {
- mDataWindow = new AlbumSlidingWindow(mActivity, model, CACHE_SIZE);
+ mDataWindow = new AlbumSlidingWindow(mActivity, model, CACHE_SIZE,
+ mLabelSpec, mIsGridViewShown);
mDataWindow.setListener(new MyDataModelListener());
mSlotView.setSlotCount(model.size());
+
}
}
private static Texture checkTexture(Texture texture) {
return (texture instanceof TiledTexture)
- && !((TiledTexture) texture).isReady()
- ? null
- : texture;
+ && !((TiledTexture) texture).isReady() ? null : texture;
}
@Override
- public int renderSlot(GLCanvas canvas, int index, int pass, int width, int height) {
- if (mSlotFilter != null && !mSlotFilter.acceptSlot(index)) return 0;
+ public int renderSlot(GLCanvas canvas, int index, int pass, int width,
+ int height) {
+ int thumbSize = 0;
+ if (!mIsGridViewShown) {
+ thumbSize = mLabelSpec.iconSize;
+ }
+ if (mSlotFilter != null && !mSlotFilter.acceptSlot(index))
+ return 0;
AlbumSlidingWindow.AlbumEntry entry = mDataWindow.get(index);
@@ -118,20 +149,25 @@
entry.content = content;
}
drawContent(canvas, content, width, height, entry.rotation);
- if ((content instanceof FadeInTexture) &&
- ((FadeInTexture) content).isAnimating()) {
+ if ((content instanceof FadeInTexture)
+ && ((FadeInTexture) content).isAnimating()) {
renderRequestFlags |= SlotView.RENDER_MORE_FRAME;
}
+ if (!mIsGridViewShown)
+ renderRequestFlags |= renderLabel(canvas, entry, width, height);
if (entry.mediaType == MediaObject.MEDIA_TYPE_VIDEO) {
- drawVideoOverlay(canvas, width, height);
- } else if ((entry.mediaType == MediaObject.MEDIA_TYPE_DRM_VIDEO)
+ drawVideoOverlay(canvas, width, height, mIsGridViewShown, thumbSize);
+ }
+
+ if ((entry.mediaType == MediaObject.MEDIA_TYPE_DRM_VIDEO)
|| (entry.mediaType == MediaObject.MEDIA_TYPE_DRM_IMAGE)) {
- drawDrmOverlay(canvas, width, height, entry.mediaType);
+ drawDrmOverlay(canvas, width, height, entry.mediaType,
+ mIsGridViewShown, thumbSize);
}
if (entry.isPanorama) {
- drawPanoramaIcon(canvas, width, height);
+ drawPanoramaIcon(canvas, width, height, mIsGridViewShown, thumbSize);
}
renderRequestFlags |= renderOverlay(canvas, index, entry, width, height);
@@ -139,6 +175,19 @@
return renderRequestFlags;
}
+ protected int renderLabel(GLCanvas canvas, AlbumEntry entry, int width,
+ int height) {
+ Texture content = checkLabelTexture(entry.labelTexture);
+ if (content == null) {
+ content = mWaitLoadingTexture;
+ }
+ int b = AlbumLabelMaker.getBorderSize();
+ int h = mLabelSpec.labelBackgroundHeight;
+ content.draw(canvas, -b, height - h + b, width + b + b, h);
+
+ return 0;
+ }
+
private int renderOverlay(GLCanvas canvas, int index,
AlbumSlidingWindow.AlbumEntry entry, int width, int height) {
int renderRequestFlags = 0;
@@ -155,22 +204,30 @@
}
} else if ((entry.path != null) && (mHighlightItemPath == entry.path)) {
drawSelectedFrame(canvas, width, height);
- } else if (mInSelectionMode && mSelectionManager.isItemSelected(entry.path)) {
+ } else if (mInSelectionMode
+ && mSelectionManager.isItemSelected(entry.path)) {
drawSelectedFrame(canvas, width, height);
}
return renderRequestFlags;
}
+ private static Texture checkLabelTexture(Texture texture) {
+ return ((texture instanceof UploadedTexture) && ((UploadedTexture) texture)
+ .isUploading()) ? null : texture;
+ }
+
private class MyDataModelListener implements AlbumSlidingWindow.Listener {
@Override
public void onContentChanged() {
mSlotView.invalidate();
+
}
@Override
public void onSizeChanged(int size) {
mSlotView.setSlotCount(size);
mSlotView.invalidate();
+
}
}
@@ -196,7 +253,9 @@
@Override
public void onSlotSizeChanged(int width, int height) {
- // Do nothing
+ if (!mIsGridViewShown && mDataWindow != null) {
+ mDataWindow.onSlotSizeChanged(width, height);
+ }
}
public void setSlotFilter(SlotFilter slotFilter) {
diff --git a/src/com/android/gallery3d/ui/DialogDetailsView.java b/src/com/android/gallery3d/ui/DialogDetailsView.java
index 2693410..84d224f 100644
--- a/src/com/android/gallery3d/ui/DialogDetailsView.java
+++ b/src/com/android/gallery3d/ui/DialogDetailsView.java
@@ -21,8 +21,10 @@
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
+import android.content.res.Resources;
import android.text.TextUtils;
import android.text.format.Formatter;
+import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -54,7 +56,7 @@
private MediaDetails mDetails;
private final DetailsSource mSource;
private int mIndex;
- private Dialog mDialog;
+ private AlertDialog mDialog;
private CloseListener mListener;
public DialogDetailsView(AbstractGalleryActivity activity, DetailsSource source) {
@@ -94,17 +96,19 @@
ListView detailsList = (ListView) LayoutInflater.from(mActivity.getAndroidContext()).inflate(
R.layout.details_list, null, false);
detailsList.setAdapter(mAdapter);
- mDialog = new AlertDialog.Builder(mActivity)
- .setView(detailsList)
- .setTitle(title)
- .setPositiveButton(R.string.close, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int whichButton) {
- mDialog.dismiss();
- }
- })
- .create();
+ AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
+ builder.setView(detailsList);
+ builder.setTitle(title);
+ builder.setPositiveButton(R.string.close,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ mDialog.dismiss();
+ }
+ });
+
+ mDialog = builder.create();
mDialog.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
@@ -113,6 +117,24 @@
}
}
});
+ mDialog.show();
+ Resources r = mActivity.getResources();
+
+ int buttonColor = r.getColor(R.color.dialog_button_color);
+ mDialog.getButton(DialogInterface.BUTTON_POSITIVE)
+ .setTextSize(TypedValue.COMPLEX_UNIT_SP,14);
+ mDialog.getButton(DialogInterface.BUTTON_POSITIVE).setTextColor(
+ buttonColor);
+
+ builder.setView(detailsList);
+ builder.setTitle(title);
+ builder.setPositiveButton(R.string.close,
+ new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ mDialog.dismiss();
+ }
+ });
}
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java
index 2e8b906..c4636cb 100644
--- a/src/com/android/gallery3d/ui/MenuExecutor.java
+++ b/src/com/android/gallery3d/ui/MenuExecutor.java
@@ -183,9 +183,9 @@
supportPrint &= PrintHelper.systemSupportsPrint();
boolean supportDrmInfo = (supported & MediaObject.SUPPORT_DRM_INFO) != 0;
setMenuItemVisible(menu, R.id.action_delete, supportDelete);
- setMenuItemVisible(menu, R.id.action_rotate_ccw, supportRotate);
- setMenuItemVisible(menu, R.id.action_rotate_cw, supportRotate);
- setMenuItemVisible(menu, R.id.action_crop, supportCrop);
+ //setMenuItemVisible(menu, R.id.action_rotate_ccw, supportRotate);
+ //setMenuItemVisible(menu, R.id.action_rotate_cw, supportRotate);
+ //setMenuItemVisible(menu, R.id.action_crop, supportCrop);
setMenuItemVisible(menu, R.id.action_trim, supportTrim);
setMenuItemVisible(menu, R.id.action_mute, supportMute);
// Hide panorama until call to updateMenuForPanorama corrects it
@@ -204,8 +204,8 @@
boolean disablePanorama360Options) {
setMenuItemVisible(menu, R.id.action_share_panorama, shareAsPanorama360);
if (disablePanorama360Options) {
- setMenuItemVisible(menu, R.id.action_rotate_ccw, false);
- setMenuItemVisible(menu, R.id.action_rotate_cw, false);
+ //setMenuItemVisible(menu, R.id.action_rotate_ccw, false);
+ //setMenuItemVisible(menu, R.id.action_rotate_cw, false);
}
}
@@ -242,11 +242,11 @@
mSelectionManager.selectAll();
}
return;
- case R.id.action_crop: {
+ /*case R.id.action_crop: {
Intent intent = getIntentBySingleSelectedPath(CropActivity.CROP_ACTION);
((Activity) mActivity).startActivity(intent);
return;
- }
+ }*/
case R.id.action_edit: {
Intent intent = getIntentBySingleSelectedPath(Intent.ACTION_EDIT)
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
@@ -273,12 +273,15 @@
case R.id.action_delete:
title = R.string.delete;
break;
- case R.id.action_rotate_cw:
+ case R.id.photopage_bottom_control_delete:
+ title = R.string.delete;
+ break;
+ /*case R.id.action_rotate_cw:
title = R.string.rotate_right;
break;
case R.id.action_rotate_ccw:
title = R.string.rotate_left;
- break;
+ break;*/
case R.id.action_show_on_map:
title = R.string.show_on_map;
break;
@@ -335,7 +338,14 @@
public void onMenuClicked(MenuItem menuItem, String confirmMsg,
final ProgressListener listener) {
- final int action = menuItem.getItemId();
+ final int action;
+ if (menuItem == null) {
+ action = R.id.photopage_bottom_control_delete;
+ }
+ else
+ {
+ action = menuItem.getItemId();
+ }
if (confirmMsg != null) {
if (listener != null) listener.onConfirmDialogShown();
@@ -401,12 +411,15 @@
case R.id.action_delete:
manager.delete(path);
break;
- case R.id.action_rotate_cw:
+ case R.id.photopage_bottom_control_delete:
+ manager.delete(path);
+ break;
+ /*case R.id.action_rotate_cw:
manager.rotate(path, 90);
break;
case R.id.action_rotate_ccw:
manager.rotate(path, -90);
- break;
+ break;*/
case R.id.action_toggle_full_caching: {
MediaObject obj = manager.getMediaObject(path);
int cacheFlag = obj.getCacheFlag();
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index cb14e49..3cb24e4 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -307,7 +307,7 @@
mEdgeView.onAbsorb(velocity, direction);
}
});
- mVideoPlayIcon = new ResourceTexture(mContext, R.drawable.ic_control_play);
+ mVideoPlayIcon = new ResourceTexture(mContext, R.drawable.play_detail);
mDrmIcon = new ResourceTexture(mContext, R.drawable.drm_image);
for (int i = -SCREEN_NAIL_MAX; i <= SCREEN_NAIL_MAX; i++) {
if (i == 0) {
diff --git a/src/com/android/gallery3d/ui/PopupList.java b/src/com/android/gallery3d/ui/PopupList.java
index 248f50b..a03e27c 100644
--- a/src/com/android/gallery3d/ui/PopupList.java
+++ b/src/com/android/gallery3d/ui/PopupList.java
@@ -17,7 +17,9 @@
package com.android.gallery3d.ui;
import android.content.Context;
+import android.graphics.Color;
import android.graphics.Rect;
+import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.MeasureSpec;
@@ -154,9 +156,10 @@
private PopupWindow createPopupWindow() {
PopupWindow popup = new PopupWindow(mContext);
popup.setOnDismissListener(mOnDismissListener);
+ popup.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#ffffff")));
- popup.setBackgroundDrawable(mContext.getResources().getDrawable(
- R.drawable.menu_dropdown_panel_holo_dark));
+// popup.setBackgroundDrawable(mContext.getResources().getDrawable(
+// R.drawable.menu_dropdown_panel_holo_dark));
mContentList = new ListView(mContext, null,
android.R.attr.dropDownListViewStyle);
diff --git a/src/com/android/gallery3d/ui/SelectionManager.java b/src/com/android/gallery3d/ui/SelectionManager.java
index 0164a7a..d7cd162 100644
--- a/src/com/android/gallery3d/ui/SelectionManager.java
+++ b/src/com/android/gallery3d/ui/SelectionManager.java
@@ -147,6 +147,20 @@
}
}
+ public void toggleTimeLineSet(ArrayList<Path> paths) {
+ if (mClickedSet.containsAll(paths))
+ mClickedSet.removeAll(paths);
+ else {
+ enterSelectionMode();
+ mClickedSet.addAll(paths);
+ }
+ int count = getSelectedCount();
+ if (count == (mSourceMediaSet.getMediaItemCount() - mSourceMediaSet.getSubMediaSetCount()))
+ selectAll();
+ if (mListener != null) mListener.onSelectionChange(paths.get(0), isItemSelected(paths.get(0)));
+ if (count == 0 && mAutoLeave)
+ leaveSelectionMode();
+ }
private static boolean expandMediaSet(ArrayList<Path> items, MediaSet set, int maxSelection) {
int subCount = set.getSubMediaSetCount();
for (int i = 0; i < subCount; i++) {
diff --git a/src/com/android/gallery3d/ui/SlotView.java b/src/com/android/gallery3d/ui/SlotView.java
index eaf23f5..b5fa2bf 100644
--- a/src/com/android/gallery3d/ui/SlotView.java
+++ b/src/com/android/gallery3d/ui/SlotView.java
@@ -16,6 +16,7 @@
package com.android.gallery3d.ui;
+import android.app.Activity;
import android.graphics.Rect;
import android.os.Handler;
import android.text.TextUtils;
@@ -24,6 +25,7 @@
import android.view.View;
import android.view.animation.DecelerateInterpolator;
+import com.android.gallery3d.R;
import com.android.gallery3d.anim.Animation;
import com.android.gallery3d.app.AbstractGalleryActivity;
import com.android.gallery3d.common.Utils;
@@ -35,7 +37,7 @@
@SuppressWarnings("unused")
private static final String TAG = "SlotView";
- private static final boolean WIDE = true;
+ private static final boolean WIDE = false;
private static final int INDEX_NONE = -1;
public static final int RENDER_MORE_PASS = 1;
@@ -94,11 +96,13 @@
// Flag to check whether it is come from Photo Page.
private boolean isFromPhotoPage = false;
+ private Activity mActivity;
public SlotView(AbstractGalleryActivity activity, Spec spec) {
mGestureDetector = new GestureDetector(activity, new MyGestureListener());
mScroller = new ScrollerHelper(activity);
mHandler = new SynchronizedHandler(activity.getGLRoot());
+ mActivity = activity;
setSlotSpec(spec);
}
@@ -410,6 +414,9 @@
public int rowsLand = -1;
public int rowsPort = -1;
public int slotGap = -1;
+ public int slotGapLand = -1;
+ public int colsLand = -1;
+ public int colsPort = -1;
}
public class Layout {
@@ -508,7 +515,7 @@
int availableUnits = Math.min(mUnitCount, mSlotCount);
int usedMinorLength = availableUnits * minorUnitSize +
(availableUnits - 1) * mSlotGap;
- padding[0] = (minorLength - usedMinorLength) / 2;
+ padding[0] = 0;//mActivity.getResources().getDimensionPixelSize(R.dimen.toolbar_height);
// Then calculate how many columns we need for all slots.
int count = ((mSlotCount + mUnitCount - 1) / mUnitCount);
@@ -516,20 +523,20 @@
// If the content length is less then the screen width, put
// extra padding in left and right.
- padding[1] = Math.max(0, (majorLength - mContentLength) / 2);
+ padding[1] = 0 ;//Math.max(0, (majorLength - mContentLength) / 2);
}
private void initLayoutParameters() {
// Initialize mSlotWidth and mSlotHeight from mSpec
if (mSpec.slotWidth != -1) {
- mSlotGap = 0;
- mSlotWidth = mSpec.slotWidth;
- mSlotHeight = mSpec.slotHeight;
+ mSlotGap = (mWidth > mHeight) ? mSpec.slotGapLand : mSpec.slotGap;
+ int cols = (mWidth > mHeight) ? mSpec.colsLand : mSpec.colsPort;
+ mSlotHeight = Math.max(1, (mWidth - (cols - 1) * mSlotGap) / cols) ;
+ mSlotWidth = mSlotHeight ;//mSpec.slotWidth;
} else {
- int rows = (mWidth > mHeight) ? mSpec.rowsLand : mSpec.rowsPort;
- mSlotGap = mSpec.slotGap;
- mSlotHeight = Math.max(1, (mHeight - (rows - 1) * mSlotGap) / rows);
- mSlotWidth = mSlotHeight - mSpec.slotHeightAdditional;
+ mSlotGap = (mWidth > mHeight) ? mSpec.slotGapLand : mSpec.slotGap;;
+ mSlotHeight = mSpec.slotHeight;//Math.max(1, (mHeight - (rows - 1) * mSlotGap) / rows);
+ mSlotWidth = mWidth;//mSlotHeight - mSpec.slotHeightAdditional;
}
if (mRenderer != null) {
diff --git a/src/com/android/gallery3d/util/GalleryUtils.java b/src/com/android/gallery3d/util/GalleryUtils.java
index 8e4ebb7..d7fb333 100644
--- a/src/com/android/gallery3d/util/GalleryUtils.java
+++ b/src/com/android/gallery3d/util/GalleryUtils.java
@@ -23,6 +23,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
@@ -44,6 +45,7 @@
import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.data.DataManager;
import com.android.gallery3d.data.MediaItem;
+import com.android.gallery3d.ui.SharedPreferencesCompat;
import com.android.gallery3d.ui.TiledScreenNail;
import com.android.gallery3d.util.IntentHelper;
import com.android.gallery3d.util.ThreadPool.CancelListener;
@@ -421,4 +423,18 @@
int h = item.getHeight();
return (h > 0 && w / h >= 2);
}
+ // Newly added methods
+ public static int getIntPref(Context context, String name, int def) {
+ SharedPreferences prefs =
+ context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE);
+ return prefs.getInt(name, def);
+ }
+
+ public static void setIntPref(Context context, String name, int value) {
+ SharedPreferences prefs =
+ context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE);
+ Editor ed = prefs.edit();
+ ed.putInt(name, value);
+ ed.commit();
+ }
}