summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-30 12:03:40 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-30 12:03:40 -0400
commit306feaf596407d33ab8157d63b1788789a6accd4 (patch)
tree38b3ca06a14e223dd4ca7c72e3837dd7a3f2fdec
parentbd955bf11e88920aa44ae9b043b7bfb8573bbc4a (diff)
parent83932c74ba031eb2f581f1557c1a90f4b5bbb423 (diff)
downloadpackages_apps_browser-306feaf596407d33ab8157d63b1788789a6accd4.zip
packages_apps_browser-306feaf596407d33ab8157d63b1788789a6accd4.tar.gz
packages_apps_browser-306feaf596407d33ab8157d63b1788789a6accd4.tar.bz2
Merge change Ibf40bd9e into eclair
* changes: Slide the title bar onto the screen rather than stretching it.
-rw-r--r--res/anim/find_dialog_enter.xml30
-rw-r--r--res/anim/find_dialog_exit.xml30
-rw-r--r--res/anim/title_bar_enter.xml23
-rw-r--r--res/anim/title_bar_exit.xml22
-rw-r--r--res/values/styles.xml5
-rw-r--r--src/com/android/browser/BrowserActivity.java5
6 files changed, 78 insertions, 37 deletions
diff --git a/res/anim/find_dialog_enter.xml b/res/anim/find_dialog_enter.xml
index 6e19c21..5e597a4 100644
--- a/res/anim/find_dialog_enter.xml
+++ b/res/anim/find_dialog_enter.xml
@@ -1,21 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/res/anim/options_panel_enter.xml
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
diff --git a/res/anim/find_dialog_exit.xml b/res/anim/find_dialog_exit.xml
index 5775bab..854abd0 100644
--- a/res/anim/find_dialog_exit.xml
+++ b/res/anim/find_dialog_exit.xml
@@ -1,21 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/res/anim/options_panel_exit.xml
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
diff --git a/res/anim/title_bar_enter.xml b/res/anim/title_bar_enter.xml
new file mode 100644
index 0000000..ce4df1d
--- /dev/null
+++ b/res/anim/title_bar_enter.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<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/title_bar_exit.xml b/res/anim/title_bar_exit.xml
new file mode 100644
index 0000000..b56710c
--- /dev/null
+++ b/res/anim/title_bar_exit.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<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/values/styles.xml b/res/values/styles.xml
index 89d5a04..21ab98f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -45,5 +45,10 @@
<item name="android:windowEnterAnimation">@anim/find_dialog_enter</item>
<item name="android:windowExitAnimation">@anim/find_dialog_exit</item>
</style>
+
+ <style name="TitleBar">
+ <item name="android:windowEnterAnimation">@anim/title_bar_enter</item>
+ <item name="android:windowExitAnimation">@anim/title_bar_exit</item>
+ </style>
</resources>
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 1954dad..1e7361b 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -1021,8 +1021,7 @@ public class BrowserActivity extends Activity
params.gravity = Gravity.TOP;
WebView mainView = mTabControl.getCurrentWebView();
boolean atTop = mainView != null && mainView.getScrollY() == 0;
- params.windowAnimations = atTop ? 0
- : com.android.internal.R.style.Animation_DropDownDown;
+ params.windowAnimations = atTop ? 0 : R.style.TitleBar;
// XXX : Without providing an offset, the fake title bar will be
// placed underneath the status bar. Use the global visible rect
// of mBrowserFrameLayout to determine the bottom of the status bar
@@ -1063,7 +1062,7 @@ public class BrowserActivity extends Activity
// fake title bar was displayed. Make sure it has the appropriate
// animation/lack thereof before removing.
params.windowAnimations = mainView != null && mainView.getScrollY() == 0
- ? 0 : com.android.internal.R.style.Animation_DropDownDown;
+ ? 0 : R.style.TitleBar;
WindowManager manager
= (WindowManager) getSystemService(Context.WINDOW_SERVICE);
manager.updateViewLayout(mFakeTitleBarHolder, params);