diff options
author | Tarun Nainani <tnainani@codeaurora.org> | 2015-02-05 11:47:35 -0800 |
---|---|---|
committer | WebTech Code Review <code-review@localhost> | 2015-05-04 11:20:08 -0700 |
commit | 87a8668ff9267c63b3d46cbe1bdf352ebbb12379 (patch) | |
tree | 9ed1ad7e7a780da0d4aa4dab09dd07f3c22d815c /res | |
parent | 76ccff285e5d5481b131f2c9cd6d4c83a371e11a (diff) | |
download | android_packages_apps_Gello-87a8668ff9267c63b3d46cbe1bdf352ebbb12379.tar.gz android_packages_apps_Gello-87a8668ff9267c63b3d46cbe1bdf352ebbb12379.tar.bz2 android_packages_apps_Gello-87a8668ff9267c63b3d46cbe1bdf352ebbb12379.zip |
Implement ComboView for Bookmarks, History and SavedPages
- Replaces ComboViewActivity for PhoneUi.
- Lives as part of the BrowserActivity's ViewTree.
- Avoids construction of ComboViewActivity everytime the bookmarks screen is opened.
Change-Id: Ic7042de731a4cc2107a297c9f7d4356bc2c30f2e
Diffstat (limited to 'res')
-rw-r--r-- | res/anim/combo_view_enter.xml | 38 | ||||
-rw-r--r-- | res/anim/combo_view_exit.xml | 38 | ||||
-rw-r--r-- | res/layout/combo_view.xml | 45 | ||||
-rw-r--r-- | res/layout/custom_screen.xml | 5 | ||||
-rw-r--r-- | res/layout/nav_tab_view.xml | 2 | ||||
-rwxr-xr-x | res/layout/tab.xml | 1 | ||||
-rw-r--r-- | res/values-sw600dp-v17/styles.xml | 2 | ||||
-rw-r--r-- | res/values-v17/styles.xml | 17 | ||||
-rw-r--r-- | res/values/ids.xml | 1 |
9 files changed, 138 insertions, 11 deletions
diff --git a/res/anim/combo_view_enter.xml b/res/anim/combo_view_enter.xml new file mode 100644 index 00000000..b0e23690 --- /dev/null +++ b/res/anim/combo_view_enter.xml @@ -0,0 +1,38 @@ +<?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. + * + --> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:anim/decelerate_interpolator"> + <translate android:fromYDelta="25%" android:toYDelta="0" + android:duration="@android:integer/config_shortAnimTime"/> + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:duration="@android:integer/config_shortAnimTime" /> +</set> diff --git a/res/anim/combo_view_exit.xml b/res/anim/combo_view_exit.xml new file mode 100644 index 00000000..22dd1298 --- /dev/null +++ b/res/anim/combo_view_exit.xml @@ -0,0 +1,38 @@ +<?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. + * + --> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:anim/accelerate_interpolator"> + <translate android:fromYDelta="0" android:toYDelta="50%" + android:duration="@android:integer/config_shortAnimTime"/> + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:duration="@android:integer/config_shortAnimTime" /> +</set> diff --git a/res/layout/combo_view.xml b/res/layout/combo_view.xml new file mode 100644 index 00000000..81e08c92 --- /dev/null +++ b/res/layout/combo_view.xml @@ -0,0 +1,45 @@ +<?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. + * + */ +--> + +<com.android.browser.ComboView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/white" + android:orientation="vertical"> + + <android.support.v4.view.ViewPager + android:id="@+id/combo_view_pager" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> + +</com.android.browser.ComboView> diff --git a/res/layout/custom_screen.xml b/res/layout/custom_screen.xml index df5c0f79..acc63a40 100644 --- a/res/layout/custom_screen.xml +++ b/res/layout/custom_screen.xml @@ -25,5 +25,10 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> + <ViewStub + android:id="@+id/combo_view_stub" + android:layout="@layout/combo_view" + android:layout_width="match_parent" + android:layout_height="match_parent" /> </merge> diff --git a/res/layout/nav_tab_view.xml b/res/layout/nav_tab_view.xml index c2f8f1a7..1fde7895 100644 --- a/res/layout/nav_tab_view.xml +++ b/res/layout/nav_tab_view.xml @@ -54,7 +54,7 @@ <!-- Preview Image --> <ImageView - android:id="@+id/tab_view" + android:id="@+id/tab_preview" android:layout_width="@dimen/nav_tab_width" android:layout_height="@dimen/nav_tab_height" android:paddingStart="2dip" diff --git a/res/layout/tab.xml b/res/layout/tab.xml index 69baf56c..8bf3327c 100755 --- a/res/layout/tab.xml +++ b/res/layout/tab.xml @@ -21,7 +21,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" - android:fitsSystemWindows="true" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/res/values-sw600dp-v17/styles.xml b/res/values-sw600dp-v17/styles.xml index bcfb749c..84b17b5b 100644 --- a/res/values-sw600dp-v17/styles.xml +++ b/res/values-sw600dp-v17/styles.xml @@ -21,7 +21,7 @@ <item name="android:windowActionBar">true</item> <item name="android:windowNoTitle">false</item> <!--<item name="android:windowActionModeOverlay">true</item>--> - <item name="android:actionBarStyle">@style/ActionBarStyle</item> + <item name="android:actionBarStyle">@style/LightActionBarStyle</item> <item name="android:actionBarSize">56dip</item> </style> diff --git a/res/values-v17/styles.xml b/res/values-v17/styles.xml index 61be170d..899a15b6 100644 --- a/res/values-v17/styles.xml +++ b/res/values-v17/styles.xml @@ -44,11 +44,12 @@ <style name="BrowserTheme" parent="@style/BrowserBase"> <item name="android:windowBackground">@color/browser_window_background</item> - - <item name="android:windowActionBar">false</item> - <item name="android:windowNoTitle">true</item> + <item name="android:windowActionBar">true</item> + <item name="android:windowActionBarOverlay">true</item> + <item name="android:windowNoTitle">false</item> + <item name="android:actionBarStyle">@style/LightActionBarStyle</item> + <item name="android:actionBarTabBarStyle">@style/LightActionBarTabBarStyle</item> <item name="android:windowActionModeOverlay">true</item> - <item name="android:actionBarStyle">@style/ActionBarStyle</item> <item name="android:actionBarSize">56dip</item> <item name="android:popupMenuStyle">@style/PopupMenuStyle</item> </style> @@ -75,15 +76,15 @@ <style name="SettingsTheme" parent="@style/BrowserBase"> </style> - <style name="ComboViewActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar"> + <style name="LightActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar"> <item name="android:background">@color/comboViewActionBarColor</item> </style> - <style name="ComboViewActionBarTabBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar.TabBar"> + <style name="LightActionBarTabBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar.TabBar"> <item name="android:background">@color/comboViewActionBarColor</item> </style> <style name="ComboViewTheme" parent="@style/BrowserBase"> - <item name="android:actionBarStyle">@style/ComboViewActionBarStyle</item> - <item name="android:actionBarTabBarStyle">@style/ComboViewActionBarTabBarStyle</item> + <item name="android:actionBarStyle">@style/LightActionBarStyle</item> + <item name="android:actionBarTabBarStyle">@style/LightActionBarTabBarStyle</item> </style> <style name="NavButton"> diff --git a/res/values/ids.xml b/res/values/ids.xml index dfe4b3f7..3cca4a09 100644 --- a/res/values/ids.xml +++ b/res/values/ids.xml @@ -23,4 +23,5 @@ <item type="id" name="position" /> <item type="id" name="load_object" /> <item type="id" name="menu_item_enter_anim_id" /> + <item type="id" name="combo_view_container" /> </resources> |