diff options
author | Chao Zhang <chaoz@codeaurora.org> | 2016-06-06 10:39:35 +0800 |
---|---|---|
committer | Likai Ding <likaid@codeaurora.org> | 2016-07-08 09:51:55 +0800 |
commit | ad5509e1fcd462a95d6ded18cd2260bb2ea7f370 (patch) | |
tree | b785f2f0a45d9ac38f26906c99f1f226fbc18caa /res | |
parent | 8724b7e9dd3f64403f9469d20f797d7df379b9e8 (diff) | |
download | android_packages_apps_Gallery2-ad5509e1fcd462a95d6ded18cd2260bb2ea7f370.tar.gz android_packages_apps_Gallery2-ad5509e1fcd462a95d6ded18cd2260bb2ea7f370.tar.bz2 android_packages_apps_Gallery2-ad5509e1fcd462a95d6ded18cd2260bb2ea7f370.zip |
Gallery: Modify some layout according to UX.
1. change MovieActivity Theme.
2. change toolbar's theme.
3. modify Straighten editor layout.
4. modify click effect of "Video Snapshot" and "Editor Comparison".
5. modify layout of trim video's timebar.
6. change video gesture's max to 1min.
7. fix the selected picture is not selected after onPause() in AlbumPage.
Change-Id: Ief77f0efa3c9c1134eb3032992c797218a46db46
CRs-Fixed: 1032085
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/comparison.xml | 35 | ||||
-rw-r--r-- | res/drawable/ic_video_snapshot.xml | 2 | ||||
-rw-r--r-- | res/drawable/ic_video_snapshot_padding_pressed.xml | 38 | ||||
-rw-r--r-- | res/drawable/ic_video_snapshot_pressed.xml | 43 | ||||
-rw-r--r-- | res/drawable/ic_video_snapshot_selector.xml | 36 | ||||
-rw-r--r-- | res/layout/filtershow_activity.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 9 |
7 files changed, 160 insertions, 5 deletions
diff --git a/res/drawable/comparison.xml b/res/drawable/comparison.xml new file mode 100644 index 000000000..36c5331ea --- /dev/null +++ b/res/drawable/comparison.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2016, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" android:drawable="@drawable/comparison_after" /> + <item android:drawable="@drawable/comparison_before" /> +</selector> + diff --git a/res/drawable/ic_video_snapshot.xml b/res/drawable/ic_video_snapshot.xml index df5b00f5e..a0d7f45e6 100644 --- a/res/drawable/ic_video_snapshot.xml +++ b/res/drawable/ic_video_snapshot.xml @@ -35,7 +35,7 @@ android:viewportWidth="108.0"> <path android:fillColor="#FF000000" - android:fillAlpha="0.30" + android:fillAlpha="0.50" android:pathData="M54,54m-54,0a54,54 0,1 1,108 0a54,54 0,1 1,-108 0"/> <path android:fillColor="#FFFFFFFF" diff --git a/res/drawable/ic_video_snapshot_padding_pressed.xml b/res/drawable/ic_video_snapshot_padding_pressed.xml new file mode 100644 index 000000000..a66444db5 --- /dev/null +++ b/res/drawable/ic_video_snapshot_padding_pressed.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2016, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<inset + xmlns:android="http://schemas.android.com/apk/res/android" + android:drawable="@drawable/ic_video_snapshot_pressed" + android:insetTop="12dp" + android:insetRight="12dp" + android:insetBottom="12dp" + android:insetLeft="12dp"/> + diff --git a/res/drawable/ic_video_snapshot_pressed.xml b/res/drawable/ic_video_snapshot_pressed.xml new file mode 100644 index 000000000..da65406cf --- /dev/null +++ b/res/drawable/ic_video_snapshot_pressed.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2016, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="36dp" + android:width="36dp" + android:viewportHeight="108.0" + android:viewportWidth="108.0"> + <path + android:fillColor="#FF000000" + android:fillAlpha="0.26" + android:pathData="M54,54m-54,0a54,54 0,1 1,108 0a54,54 0,1 1,-108 0"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M42,36h6v-6h-6V36zM30,72h6v-6h-6V72zM72,30h-6v6h6V30zM60,30h-6v6h6V30zM72,42h-6v6h6V42zM30,60h6v-6h-6V60zM72,66V54h-6v12H54v6h12v10h6V72h10v-6H72zM42,72h6v-6h-6V72zM30,48h6v-6h-6V48zM30,36h6v-6h-6V36z"/> +</vector> diff --git a/res/drawable/ic_video_snapshot_selector.xml b/res/drawable/ic_video_snapshot_selector.xml new file mode 100644 index 000000000..22846e05b --- /dev/null +++ b/res/drawable/ic_video_snapshot_selector.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2016, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/ic_video_snapshot_padding_pressed" + android:state_pressed="true" /> + <item android:drawable="@drawable/ic_video_snapshot_padding" /> +</selector> + diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml index 2a7ea6d33..1c58e1209 100644 --- a/res/layout/filtershow_activity.xml +++ b/res/layout/filtershow_activity.xml @@ -54,7 +54,7 @@ android:layout_marginRight="@dimen/compare_margin_right" android:layout_marginTop="@dimen/compare_margin_top" android:background="@android:color/transparent" - android:src="@drawable/comparison_before" + android:src="@drawable/comparison" android:visibility="visible" /> </RelativeLayout> diff --git a/res/values/styles.xml b/res/values/styles.xml index 02a79df5f..dc4b9ae7d 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -41,6 +41,8 @@ <style name="FilterShowToolbar" parent="@android:style/Widget.Toolbar"> <item name="android:contentInsetStart">0dp</item> </style> + <style name="Theme.MovieActivity" parent="android:Theme.DeviceDefault.Light.DarkActionBar"> + </style> <style name="Theme.Crop" parent="Theme.GalleryBase"> <item name="android:displayOptions"></item> <item name="android:windowContentOverlay">@null</item> @@ -339,13 +341,14 @@ <style name="ToolbarPopUpTheme" parent="android:Theme.Material.Light" /> <!-- Styles --> - <style name="MyOverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow"> + <style name="MyOverFlow" parent="@android:style/Widget.DeviceDefault.ActionButton"> <item name="android:src">@drawable/multiselect_more</item> </style> - <style name="WhiteOverflow" parent="@android:style/Widget.Holo.ActionButton.Overflow"> + <style name="WhiteOverflow" parent="@android:style/Widget.DeviceDefault.ActionButton"> <item name="android:src">@drawable/more</item> </style> - <style name="FilterShowActionBar" parent="@android:style/Widget.Holo.Light.ActionBar"> + <style name="FilterShowActionBar" parent="@android:style/Widget.DeviceDefault.Light.ActionBar"> <item name="android:background">@color/edit_actionbar_background</item> + <item name="android:contentInsetStart">0dp</item> </style> </resources> |