Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 278783e

Browse files
author
Wes Johnston
committed
Bug 813288 - Use same doorhanger transitions as desktop. r=lucasr
1 parent a254b1f commit 278783e

7 files changed

Lines changed: 43 additions & 0 deletions

File tree

mobile/android/base/DoorHangerPopup.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public class DoorHangerPopup extends PopupWindow
5454
registerEventListener("Doorhanger:Add");
5555
registerEventListener("Doorhanger:Remove");
5656
Tabs.registerOnTabsChangedListener(this);
57+
58+
setAnimationStyle(R.style.PopupAnimation);
5759
}
5860

5961
void destroy() {

mobile/android/base/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,8 @@ RES_XML = \
526526

527527
RES_ANIM = \
528528
res/anim/awesomebar_fade_in.xml \
529+
res/anim/popup_show.xml \
530+
res/anim/popup_hide.xml \
529531
res/anim/awesomebar_fade_out.xml \
530532
res/anim/awesomebar_hold_still.xml \
531533
res/anim/grow_fade_in.xml \

mobile/android/base/MenuPopup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public MenuPopup(Context context) {
5555
mArrowBottom = (ImageView) layout.findViewById(R.id.menu_arrow_bottom);
5656
mPanel = (RelativeLayout) layout.findViewById(R.id.menu_panel);
5757
mShowArrow = true;
58+
setAnimationStyle(R.style.PopupAnimation);
5859
}
5960

6061
/**

mobile/android/base/SiteIdentityPopup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private SiteIdentityPopup() {
5353
mResources = GeckoApp.mAppContext.getResources();
5454
mYOffset = mResources.getDimensionPixelSize(R.dimen.menu_popup_offset);
5555
mInflated = false;
56+
setAnimationStyle(R.style.PopupAnimation);
5657
}
5758

5859
public static synchronized SiteIdentityPopup getInstance() {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- This Source Code Form is subject to the terms of the Mozilla Public
3+
- License, v. 2.0. If a copy of the MPL was not distributed with this
4+
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5+
6+
<set xmlns:android="http://schemas.android.com/apk/res/android"
7+
android:interpolator="@android:anim/decelerate_interpolator"
8+
android:duration="150">
9+
10+
<translate android:fromYDelta="-0"
11+
android:toYDelta="-20"/>
12+
13+
<alpha android:fromAlpha="1.0"
14+
android:toAlpha="0.0"/>
15+
16+
</set>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- This Source Code Form is subject to the terms of the Mozilla Public
3+
- License, v. 2.0. If a copy of the MPL was not distributed with this
4+
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5+
6+
<set xmlns:android="http://schemas.android.com/apk/res/android"
7+
android:interpolator="@android:anim/decelerate_interpolator"
8+
android:duration="150">
9+
10+
<translate android:fromYDelta="-20"
11+
android:toYDelta="0"/>
12+
13+
<alpha android:fromAlpha="0.0"
14+
android:toAlpha="1.0"/>
15+
16+
</set>

mobile/android/base/resources/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,9 @@
428428
<item name="android:textAppearance">@style/TextAppearance</item>
429429
</style>
430430

431+
<style name="PopupAnimation">
432+
<item name="@android:windowEnterAnimation">@anim/popup_show</item>
433+
<item name="@android:windowExitAnimation">@anim/popup_hide</item>
434+
</style>
435+
431436
</resources>

0 commit comments

Comments
 (0)