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

Commit aeb38b3

Browse files
committed
Bug 850927: Redundant doorhanger layout xml file. [r=mfinkle]
--HG-- extra : rebase_source : e32481672ca80b654a51237fe33250217e8cd1c3
1 parent 47cab56 commit aeb38b3

11 files changed

Lines changed: 38 additions & 104 deletions

File tree

mobile/android/base/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,6 @@ RES_LAYOUT_LAND_V14 = \
447447
RES_LAYOUT_LARGE_V11 = \
448448
res/layout-large-v11/awesomebar_search.xml \
449449
res/layout-large-v11/browser_toolbar_menu.xml \
450-
res/layout-large-v11/doorhangerpopup.xml \
451-
res/layout-large-v11/site_identity_popup.xml \
452450
$(NULL)
453451

454452
RES_LAYOUT_LARGE_LAND_V11 = \
@@ -499,6 +497,7 @@ RES_VALUES_LARGE_V11 = \
499497
res/values-large-v11/dimens.xml \
500498
res/values-large-v11/layout.xml \
501499
res/values-large-v11/styles.xml \
500+
res/values-large-v11/themes.xml \
502501
$(NULL)
503502

504503
RES_VALUES_LARGE_LAND_V11 = \

mobile/android/base/SiteIdentityPopup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void show(View v) {
156156

157157
int offset = 0;
158158
if (HardwareUtils.isTablet()) {
159-
int popupWidth = mResources.getDimensionPixelSize(R.dimen.popup_width);
159+
int popupWidth = mResources.getDimensionPixelSize(R.dimen.doorhanger_width);
160160
offset = 0 - popupWidth + arrowWidth*3/2 + v.getWidth()/2;
161161
}
162162

mobile/android/base/resources/layout-large-v11/doorhangerpopup.xml

Lines changed: 0 additions & 30 deletions
This file was deleted.

mobile/android/base/resources/layout-large-v11/site_identity_popup.xml

Lines changed: 0 additions & 68 deletions
This file was deleted.

mobile/android/base/resources/layout/doorhangerpopup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
android:layout_width="fill_parent"
88
android:layout_height="wrap_content">
99

10-
<ScrollView android:layout_width="fill_parent"
10+
<ScrollView android:layout_width="?attr/doorhangerWidth"
1111
android:layout_height="wrap_content"
1212
android:layout_alignParentTop="true"
1313
android:background="@drawable/doorhanger_popup_bg">

mobile/android/base/resources/layout/site_identity_popup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
55

66
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
7-
android:layout_width="fill_parent"
7+
android:layout_width="?attr/doorhangerWidth"
88
android:layout_height="wrap_content">
99

1010
<LinearLayout android:layout_width="fill_parent"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<resources>
7+
8+
<!--
9+
Base application theme. This could be overridden by GeckoBaseTheme
10+
in other res/values-XXX/themes.xml.
11+
-->
12+
<style name="GeckoBase" parent="@android:style/Theme.Holo.Light">
13+
<item name="android:windowContentOverlay">@null</item>
14+
<item name="android:windowActionBar">false</item>
15+
<item name="android:windowNoTitle">true</item>
16+
<item name="doorhangerWidth">@dimen/doorhanger_width</item>
17+
</style>
18+
19+
</resources>

mobile/android/base/resources/values-v11/themes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<item name="android:windowContentOverlay">@null</item>
1414
<item name="android:windowActionBar">false</item>
1515
<item name="android:windowNoTitle">true</item>
16+
<item name="doorhangerWidth">fill_parent</item>
1617
</style>
1718

1819
<style name="GeckoDialogBase" parent="@android:style/Theme.Holo.Dialog">

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
<attr name="more_text" format="string"/>
1212
</declare-styleable>
1313

14+
<!-- DoorHangers -->
15+
<declare-styleable name="DoorHanger">
16+
<attr name="doorhangerWidth" format="dimension">
17+
<enum name="fill_parent" value="-1" />
18+
<enum name="match_parent" value="-1" />
19+
<enum name="wrap_content" value="-2" />
20+
</attr>
21+
</declare-styleable>
22+
1423
<declare-styleable name="MenuItem">
1524
<attr name="android:id"/>
1625
<attr name="android:orderInCategory"/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
<dimen name="browser_toolbar_icon_width">36dp</dimen>
3434
<dimen name="browser_toolbar_lock_width">20dp</dimen>
3535
<dimen name="browser_toolbar_favicon_size">29.33dip</dimen>
36+
37+
<!-- Max width of the doorhanger on tablets -->
38+
<dimen name="doorhanger_width">400dp</dimen>
39+
3640
<dimen name="flow_layout_spacing">6dp</dimen>
3741
<dimen name="menu_item_icon">21dp</dimen>
3842
<dimen name="menu_item_state_icon">18dp</dimen>
@@ -52,7 +56,6 @@
5256
<dimen name="prompt_service_min_list_item_height">48dp</dimen>
5357
<dimen name="remote_tab_child_row_height">64dp</dimen>
5458
<dimen name="remote_tab_group_row_height">26dp</dimen>
55-
<dimen name="popup_width">400dp</dimen>
5659
<dimen name="tab_thumbnail_height">90dp</dimen>
5760
<dimen name="tab_thumbnail_width">160dp</dimen>
5861
<dimen name="tabs_counter_size">22sp</dimen>

0 commit comments

Comments
 (0)