summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable/beautify_background.xml34
-rw-r--r--res/drawable/beautify_select.xml39
-rw-r--r--res/drawable/color_background.xml35
-rw-r--r--res/drawable/color_select.xml39
-rw-r--r--res/drawable/crop_background.xml34
-rw-r--r--res/drawable/crop_select.xml39
-rw-r--r--res/drawable/dualcamera_background.xml34
-rw-r--r--res/drawable/dualcamera_select.xml51
-rw-r--r--res/drawable/exposure_background.xml34
-rw-r--r--res/drawable/exposure_select.xml39
-rw-r--r--res/drawable/frames_background.xml34
-rw-r--r--res/drawable/frames_select.xml45
-rw-r--r--res/layout/filtershow_activity.xml2
-rw-r--r--res/layout/filtershow_category_panel_new.xml4
-rw-r--r--res/layout/filtershow_main_panel.xml49
-rw-r--r--res/values/dimens.xml2
-rw-r--r--res/values/filtershow_color.xml13
-rw-r--r--res/values/filtershow_values.xml9
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java22
-rw-r--r--src/com/android/gallery3d/filtershow/category/CategoryView.java25
-rw-r--r--src/com/android/gallery3d/filtershow/category/IconView.java40
-rw-r--r--src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java16
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java12
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java1
24 files changed, 571 insertions, 81 deletions
diff --git a/res/drawable/beautify_background.xml b/res/drawable/beautify_background.xml
new file mode 100644
index 000000000..26f13a61f
--- /dev/null
+++ b/res/drawable/beautify_background.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/beautify" android:state_selected="false"></item>
+ <item android:drawable="@drawable/beautify_select" android:state_selected="true"></item>
+</selector> \ No newline at end of file
diff --git a/res/drawable/beautify_select.xml b/res/drawable/beautify_select.xml
new file mode 100644
index 000000000..68cff5887
--- /dev/null
+++ b/res/drawable/beautify_select.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android: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="#FF4F92E9"/>
+</vector>
diff --git a/res/drawable/color_background.xml b/res/drawable/color_background.xml
new file mode 100644
index 000000000..1d4c1f609
--- /dev/null
+++ b/res/drawable/color_background.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/color" android:state_selected="false"></item>
+ <item android:drawable="@drawable/color_select" android:state_selected="true"></item>
+
+</selector> \ No newline at end of file
diff --git a/res/drawable/color_select.xml b/res/drawable/color_select.xml
new file mode 100644
index 000000000..79d107021
--- /dev/null
+++ b/res/drawable/color_select.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android: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="#FF4F92E9"/>
+</vector>
diff --git a/res/drawable/crop_background.xml b/res/drawable/crop_background.xml
new file mode 100644
index 000000000..079b0772f
--- /dev/null
+++ b/res/drawable/crop_background.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/crop" android:state_selected="false"></item>
+ <item android:drawable="@drawable/crop_select" android:state_selected="true"></item>
+</selector> \ No newline at end of file
diff --git a/res/drawable/crop_select.xml b/res/drawable/crop_select.xml
new file mode 100644
index 000000000..f2a8269f9
--- /dev/null
+++ b/res/drawable/crop_select.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android: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="#FF4F92E9"/>
+</vector>
diff --git a/res/drawable/dualcamera_background.xml b/res/drawable/dualcamera_background.xml
new file mode 100644
index 000000000..08e21472c
--- /dev/null
+++ b/res/drawable/dualcamera_background.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/dualcamera" android:state_selected="false"></item>
+ <item android:drawable="@drawable/dualcamera_select" android:state_selected="true"></item>
+</selector> \ No newline at end of file
diff --git a/res/drawable/dualcamera_select.xml b/res/drawable/dualcamera_select.xml
new file mode 100644
index 000000000..9835120b3
--- /dev/null
+++ b/res/drawable/dualcamera_select.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android: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="#FF4F92E9"/>
+ <path
+ android:pathData="M21,7h4v5h2V7.713C27,6.341 26.156,5 24.783,5H21V7z"
+ android:fillColor="#FF4F92E9"/>
+ <path
+ android:pathData="M7,12V7h4V5H7.399C6.027,5 5,6.341 5,7.713V12H7z"
+ android:fillColor="#FF4F92E9"/>
+ <path
+ android:pathData="M11,26H7v-5H5v4.098C5,26.471 6.027,28 7.399,28H11V26z"
+ android:fillColor="#FF4F92E9"/>
+ <path
+ android:pathData="M25,21v5h-4v2h3.783C26.156,28 27,26.471 27,25.098V21H25z"
+ android:fillColor="#FF4F92E9"/>
+</vector>
diff --git a/res/drawable/exposure_background.xml b/res/drawable/exposure_background.xml
new file mode 100644
index 000000000..c892e0917
--- /dev/null
+++ b/res/drawable/exposure_background.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/exposure" android:state_selected="false"></item>
+ <item android:drawable="@drawable/exposure_select" android:state_selected="true"></item>
+</selector> \ No newline at end of file
diff --git a/res/drawable/exposure_select.xml b/res/drawable/exposure_select.xml
new file mode 100644
index 000000000..7386e4c01
--- /dev/null
+++ b/res/drawable/exposure_select.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android: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="#FF4F92E9"/>
+</vector>
diff --git a/res/drawable/frames_background.xml b/res/drawable/frames_background.xml
new file mode 100644
index 000000000..0a572b9dc
--- /dev/null
+++ b/res/drawable/frames_background.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/frames" android:state_selected="false"></item>
+ <item android:drawable="@drawable/frames_select" android:state_selected="true"></item>
+</selector> \ No newline at end of file
diff --git a/res/drawable/frames_select.xml b/res/drawable/frames_select.xml
new file mode 100644
index 000000000..6fa77e7cc
--- /dev/null
+++ b/res/drawable/frames_select.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android: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="#FF4F92E9"/>
+ <path
+ android:pathData="M23.143,12.216"
+ android:fillColor="#FF4F92E9"/>
+ <path
+ android:pathData="M8.923,12.216h14.153v11.966h-14.153z"
+ android:fillColor="#FF4F92E9"/>
+</vector>
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml
index 4663ce517..56666ece3 100644
--- a/res/layout/filtershow_activity.xml
+++ b/res/layout/filtershow_activity.xml
@@ -64,6 +64,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
+ android:background="@android:color/transparent"
android:orientation="vertical"
custom:max_width="650dip" >
@@ -71,6 +72,7 @@
android:id="@+id/main_panel_container"
android:layout_width="match_parent"
android:layout_height="0dip"
+ android:background="@android:color/transparent"
android:layout_gravity="center"
android:layout_weight="1" />
</com.android.gallery3d.filtershow.CenteredLinearLayout>
diff --git a/res/layout/filtershow_category_panel_new.xml b/res/layout/filtershow_category_panel_new.xml
index 51439f011..58d45272e 100644
--- a/res/layout/filtershow_category_panel_new.xml
+++ b/res/layout/filtershow_category_panel_new.xml
@@ -20,18 +20,20 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/edit_actionbar_background">
+ android:background="@android:color/transparent">
<HorizontalScrollView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:background="@android:color/transparent"
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:background="@android:color/transparent"
custom:iconSize="@dimen/category_panel_icon_size"
android:divider="@android:color/transparent"
android:dividerPadding="8dip"
diff --git a/res/layout/filtershow_main_panel.xml b/res/layout/filtershow_main_panel.xml
index bc42be25b..7046f3089 100644
--- a/res/layout/filtershow_main_panel.xml
+++ b/res/layout/filtershow_main_panel.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
Not a Contribution
Copyright (C) 2013 The Android Open Source Project
@@ -25,7 +25,7 @@
android:baselineAligned="false"
android:orientation="vertical"
android:visibility="visible"
- android:background="@color/background_main_toolbar" >
+ android:background="@android:color/transparent" >
<FrameLayout android:id="@+id/state_panel_container"
android:layout_width="match_parent"
@@ -39,13 +39,11 @@
android:visibility="visible"
android:layout_height="0dip"
android:layout_gravity="center"
+ android:paddingRight="5dp"
+ android:paddingLeft="5dp"
+ android:background="@color/crop_panel_background_color"
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"
android:id="@+id/bottom_panel"
@@ -53,64 +51,63 @@
android:layout_height="48dip"
android:layout_gravity="center|bottom"
android:orientation="vertical"
- custom:max_width="400dip" >
+ android:background="@color/crop_panel_background_color" >
<LinearLayout
android:id="@+id/effectsContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_main_toolbar"
- android:paddingTop="10dp" >
+ android:background="@android:color/transparent" >
<ImageButton
android:id="@+id/fxButton"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
- android:background="@drawable/filtershow_button_background"
+ android:background="@android:color/transparent"
android:scaleType="centerInside"
- android:src="@drawable/color" />
+ android:src="@drawable/color_background" />
<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:background="@android:color/transparent"
android:padding="2dip"
android:scaleType="centerInside"
android:visibility="gone"
- android:src="@drawable/frames" />
+ android:src="@drawable/frames_background" />
<ImageButton
android:id="@+id/geometryButton"
android:layout_width="0dp"
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/crop" />
+ android:src="@drawable/crop_background" />
<ImageButton
android:id="@+id/colorsButton"
android:layout_width="0dp"
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/exposure" />
+ android:src="@drawable/exposure_background" />
<ImageButton
android:id="@+id/makeupButton"
android:layout_width="0dp"
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/beautify"
+ android:src="@drawable/beautify_background"
android:visibility="gone" />
<ImageButton
@@ -118,16 +115,16 @@
android:layout_width="0dp"
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:visibility="gone"
- android:src="@drawable/dualcamera"/>
+ android:src="@drawable/dualcamera_background"/>
<ImageButton
android:id="@+id/trueScannerButton"
android:layout_width="0dp"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/transparent"
android:padding="2dip"
@@ -137,7 +134,7 @@
<ImageButton
android:id="@+id/hazeBusterButton"
android:layout_width="0dp"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/transparent"
android:padding="2dip"
@@ -147,9 +144,9 @@
<ImageButton
android:id="@+id/seeStraightButton"
android:layout_width="0dp"
- android:layout_height="wrap_content"
+ 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/seestraight"/>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 87e00eea8..a3115eb7c 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -166,7 +166,7 @@
<!-- configuration for filtershow UI -->
<dimen name="thumbnail_size">96dip</dimen>
- <dimen name="thumbnail_margin">3dip</dimen>
+ <dimen name="thumbnail_margin">2dip</dimen>
<dimen name="action_item_height">175dip</dimen>
<dimen name="touch_circle_size">8dp</dimen>
diff --git a/res/values/filtershow_color.xml b/res/values/filtershow_color.xml
index 519909649..8d6bf0404 100644
--- a/res/values/filtershow_color.xml
+++ b/res/values/filtershow_color.xml
@@ -52,4 +52,17 @@
<color name="filtershow_image_mask">#4d000000</color>
<color name="filtershow_info_text">#DE000000</color>
+ <color name="filtershow_color_none">#b5b5b5</color>
+ <color name="filtershow_color_punch">#c6bcc6</color>
+ <color name="filtershow_color_vintage">#bb9e61</color>
+ <color name="filtershow_color_bw">#000000</color>
+ <color name="filtershow_color_bleach">#676f82</color>
+ <color name="filtershow_color_instant">#e1d08b</color>
+ <color name="filtershow_color_latte">#b18f7c</color>
+ <color name="filtershow_color_blue">#5d6299</color>
+ <color name="filtershow_color_litho">#c7c4b7</color>
+ <color name="filtershow_color_xprocess">#409797</color>
+
+ <color name="iconview_bottom_color">#80000000</color>
+ <color name="crop_panel_background_color">#A5000000</color>
</resources> \ No newline at end of file
diff --git a/res/values/filtershow_values.xml b/res/values/filtershow_values.xml
index 7cd8812b3..1af341ea9 100644
--- a/res/values/filtershow_values.xml
+++ b/res/values/filtershow_values.xml
@@ -22,16 +22,19 @@
<dimen name="state_panel_text_size">16dip</dimen>
<!-- Category Panel Height -->
- <dimen name="category_panel_height">86dip</dimen>
+ <dimen name="category_panel_height">90dip</dimen>
<!-- Category Panel Icon Size -->
- <dimen name="category_panel_icon_size">64dip</dimen>
+ <dimen name="category_panel_icon_size">80dip</dimen>
<!-- Category Panel Text Size -->
<dimen name="category_panel_text_size">11dip</dimen>
<!-- Category Panel Text Size -->
- <dimen name="category_panel_margin">4dip</dimen>
+ <dimen name="category_panel_margin">10dip</dimen>
+
+ <!-- Category Panel height of botton rect -->
+ <dimen name="category_panel_bottom_rect_height">20dip</dimen>
<!-- Grad filter dot size -->
<dimen name="gradcontrol_dot_size">20dip</dimen>
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index ce2ab7412..bf5deedd5 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -1519,10 +1519,6 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
for (FilterRepresentation representation : filtersRepresentations) {
mCategoryLooksAdapter.add(new Action(this, representation, Action.FULL_VIEW));
}
- if (mUserPresetsManager.getRepresentations() == null
- || mUserPresetsManager.getRepresentations().size() == 0) {
- mCategoryLooksAdapter.add(new Action(this, Action.ADD_ACTION));
- }
Fragment panel = getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG);
if (panel != null) {
@@ -1855,28 +1851,10 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
}
public void startTouchAnimation(View target, float x, float y) {
- final CategorySelected hint =
- (CategorySelected) findViewById(R.id.categorySelectedIndicator);
int location[] = new int[2];
target.getLocationOnScreen(location);
mHintTouchPoint.x = (int) (location[0] + x);
mHintTouchPoint.y = (int) (location[1] + y);
- int locationHint[] = new int[2];
- ((View)hint.getParent()).getLocationOnScreen(locationHint);
- int dx = (int) (x - (hint.getWidth())/2);
- int dy = (int) (y - (hint.getHeight())/2);
- hint.setTranslationX(location[0] - locationHint[0] + dx);
- hint.setTranslationY(location[1] - locationHint[1] + dy);
- hint.setVisibility(View.VISIBLE);
- hint.animate().scaleX(2).scaleY(2).alpha(0).withEndAction(new Runnable() {
- @Override
- public void run() {
- hint.setVisibility(View.INVISIBLE);
- hint.setScaleX(1);
- hint.setScaleY(1);
- hint.setAlpha(1);
- }
- });
}
public void setScaleImage(boolean isScaled) {
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryView.java b/src/com/android/gallery3d/filtershow/category/CategoryView.java
index 99af80f4d..fff4e0bf3 100644
--- a/src/com/android/gallery3d/filtershow/category/CategoryView.java
+++ b/src/com/android/gallery3d/filtershow/category/CategoryView.java
@@ -28,6 +28,7 @@ import android.view.MotionEvent;
import android.view.View;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.ui.SelectionRenderer;
public class CategoryView extends IconView
@@ -121,8 +122,8 @@ public class CategoryView extends IconView
}
super.onDraw(canvas);
if (mAdapter.isSelected(this)) {
- SelectionRenderer.drawSelection(canvas, 0, 0,
- getWidth(), getHeight(),
+ SelectionRenderer.drawSelection(canvas, getMargin() / 2, getMargin(),
+ getWidth() - getMargin() / 2, getHeight() - getMargin(),
mSelectionStroke, mSelectPaint, mBorderStroke, mBorderPaint);
}
}
@@ -198,4 +199,24 @@ public class CategoryView extends IconView
public void delete() {
mAdapter.remove(mAction);
}
+
+ @Override
+ protected void drawBottomRect(Canvas canvas) {
+ super.drawBottomRect(canvas);
+ FilterRepresentation filterRepresentation = mAction.getRepresentation();
+ if (filterRepresentation != null) {
+ if (filterRepresentation.getFilterType() == FilterRepresentation.TYPE_FX) {
+ mPaint.setColor(getResources().getColor(filterRepresentation.getColorId()));
+ } else {
+ mPaint.setColor(
+ getContext().getResources().getColor(R.color.iconview_bottom_color));
+ }
+ mPaint.setStyle(Paint.Style.FILL);
+ canvas.drawRect(getBitmapBounds().left,
+ getBitmapBounds().bottom - getBottomRectHeight(),
+ getBitmapBounds().right,
+ getBitmapBounds().bottom,
+ mPaint);
+ }
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/category/IconView.java b/src/com/android/gallery3d/filtershow/category/IconView.java
index 4823cd1a6..1bfd2a7af 100644
--- a/src/com/android/gallery3d/filtershow/category/IconView.java
+++ b/src/com/android/gallery3d/filtershow/category/IconView.java
@@ -21,13 +21,10 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
-import android.graphics.Shader;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.View;
@@ -44,6 +41,7 @@ public class IconView extends View {
private int mMargin = 16;
private int mOrientation = HORIZONTAL;
private int mTextSize = 32;
+ private int mBottomRectHeight;
private Rect mTextBounds = new Rect();
private Bitmap mBitmap;
private Rect mBitmapBounds;
@@ -72,6 +70,7 @@ public class IconView extends View {
mBackgroundColor = res.getColor(android.R.color.transparent);
mMargin = res.getDimensionPixelOffset(R.dimen.category_panel_margin);
mTextSize = res.getDimensionPixelSize(R.dimen.category_panel_text_size);
+ mBottomRectHeight = res.getDimensionPixelOffset(R.dimen.category_panel_bottom_rect_height);
}
protected void computeTextPosition(String text) {
@@ -108,7 +107,7 @@ public class IconView extends View {
// justify to the left.
x = mMargin;
}
- int y = canvas.getHeight() - getTextHeight(mPaint) / 2 - mMargin;
+ int y = canvas.getHeight() - mBottomRectHeight / 2 - mMargin / 2;
canvas.drawText(text, x, y, mPaint);
}
@@ -129,6 +128,13 @@ public class IconView extends View {
drawText(canvas, text);
}
+ protected void drawBottomRect(Canvas canvas) {
+ }
+
+ public int getBottomRectHeight() {
+ return mBottomRectHeight;
+ }
+
public int getOrientation() {
return mOrientation;
}
@@ -184,13 +190,14 @@ public class IconView extends View {
public void computeBitmapBounds() {
if (mUseOnlyDrawable) {
- mBitmapBounds = new Rect(mMargin/2, mMargin, getWidth() - mMargin/2,
- getHeight() - mTextSize - 2*mMargin);
+ mBitmapBounds = new Rect(mMargin / 2, mMargin, getWidth() - mMargin / 2,
+ getHeight() - mTextSize - 2 * mMargin);
} else {
if (getOrientation() == VERTICAL && isHalfImage()) {
- mBitmapBounds = new Rect(mMargin/2, mMargin, getWidth()/2, getHeight());
+ mBitmapBounds = new Rect(mMargin / 2, mMargin, getWidth() / 2, getHeight());
} else {
- mBitmapBounds = new Rect(mMargin/2, mMargin, getWidth() - mMargin/2, getHeight());
+ mBitmapBounds = new Rect(mMargin / 2, mMargin, getWidth() - mMargin / 2,
+ getHeight() - mMargin);
}
}
}
@@ -226,22 +233,7 @@ public class IconView extends View {
canvas.drawBitmap(mBitmap, m, mPaint);
canvas.restore();
}
-
- if (!mUseOnlyDrawable) {
- int startColor = Color.argb(0, 0, 0, 0);
- int endColor = Color.argb(200, 0, 0, 0);
- float start = getHeight() - 2 * mMargin - 2 * mTextSize;
- float end = getHeight();
- Shader shader = new LinearGradient(0, start, 0, end, startColor,
- endColor, Shader.TileMode.CLAMP);
- mPaint.setShader(shader);
- float startGradient = 0;
- if (getOrientation() == VERTICAL && isHalfImage()) {
- startGradient = getWidth()/2;
- }
- canvas.drawRect(new RectF(startGradient, start, getWidth(), end), mPaint);
- mPaint.setShader(null);
- }
+ drawBottomRect(canvas);
drawOutlinedText(canvas, getText());
}
}
diff --git a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
index efa351b04..b72b5d2fd 100644
--- a/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
+++ b/src/com/android/gallery3d/filtershow/filters/BaseFiltersManager.java
@@ -315,19 +315,35 @@ public abstract class BaseFiltersManager implements FiltersManagerInterface {
"LUT3D_XPROCESS"
};
+ int[] colorId = {
+ R.color.filtershow_color_none,
+ R.color.filtershow_color_punch,
+ R.color.filtershow_color_vintage,
+ R.color.filtershow_color_bw,
+ R.color.filtershow_color_bleach,
+ R.color.filtershow_color_instant,
+ R.color.filtershow_color_latte,
+ R.color.filtershow_color_blue,
+ R.color.filtershow_color_litho,
+ R.color.filtershow_color_xprocess
+ };
+
FilterFxRepresentation nullFx =
new FilterFxRepresentation(context.getString(R.string.none),
0, R.string.none);
+ nullFx.setColorId(colorId[0]);
mLooks.add(nullFx);
for (int i = 0; i < drawid.length; i++) {
FilterFxRepresentation fx = new FilterFxRepresentation(
context.getString(fxNameid[i]), drawid[i], fxNameid[i]);
fx.setSerializationName(serializationNames[i]);
+ fx.setColorId(colorId[i] + 1);
ImagePreset preset = new ImagePreset();
preset.addFilter(fx);
FilterUserPresetRepresentation rep = new FilterUserPresetRepresentation(
context.getString(fxNameid[i]), preset, -1);
+ rep.setColorId(colorId[i] + 1);
mLooks.add(rep);
addRepresentation(fx);
}
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
index 198e741c3..8d1911315 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
@@ -36,6 +36,7 @@ public class FilterRepresentation {
private int mEditorId = BasicEditor.ID;
private int mButtonId = 0;
private int mOverlayId = 0;
+ private int mColorId = 0;
private boolean mOverlayOnly = false;
private boolean mShowParameterValue = true;
private boolean mIsBooleanFilter = false;
@@ -91,12 +92,21 @@ public class FilterRepresentation {
&& representation.mOverlayId == mOverlayId
&& representation.mOverlayOnly == mOverlayOnly
&& representation.mShowParameterValue == mShowParameterValue
- && representation.mIsBooleanFilter == mIsBooleanFilter) {
+ && representation.mIsBooleanFilter == mIsBooleanFilter
+ && representation.mColorId == mColorId) {
return true;
}
return false;
}
+ public int getColorId() {
+ return mColorId;
+ }
+
+ public void setColorId(int colorId) {
+ mColorId = colorId;
+ }
+
public boolean isBooleanFilter() {
return mIsBooleanFilter;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
index 16959035d..783afee25 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
@@ -36,7 +36,6 @@ public class ImageFilterSharpen extends ImageFilterRS {
representation.setShowParameterValue(true);
representation.setFilterClass(ImageFilterSharpen.class);
representation.setTextId(R.string.sharpness);
- representation.setOverlayId(R.drawable.filtershow_button_colors_sharpen);
representation.setEditorId(BasicEditor.ID);
representation.setSupportsPartialRendering(true);
return representation;