Bug 847578: Flat Holo styled door hanger buttons. [r=mfinkle]

--HG--
extra : rebase_source : 10e4897f80d67f80846f672d97bb033b6f0637a3
This commit is contained in:
Sriram Ramasubramanian 2013-03-11 14:07:10 -07:00
parent b215d10141
commit 7413f43a3b
4 changed files with 26 additions and 7 deletions

View File

@ -86,7 +86,8 @@ public class DoorHanger extends LinearLayout implements Button.OnClickListener {
// Enable the button layout if we have buttons.
if (buttons.length() > 0) {
mChoicesLayout.setVisibility(LinearLayout.VISIBLE);
findViewById(R.id.divider).setVisibility(View.VISIBLE);
mChoicesLayout.setVisibility(View.VISIBLE);
}
setOptions(options);
@ -98,11 +99,11 @@ public class DoorHanger extends LinearLayout implements Button.OnClickListener {
LayoutParams.FILL_PARENT,
1.0f);
Button mButton = new Button(mActivity);
mButton.setText(aText);
mButton.setTag(Integer.toString(aCallback));
mButton.setOnClickListener(this);
mChoicesLayout.addView(mButton, mLayoutParams);
Button button = (Button) LayoutInflater.from(mActivity).inflate(R.layout.doorhanger_button, null);
button.setText(aText);
button.setTag(Integer.toString(aCallback));
button.setOnClickListener(this);
mChoicesLayout.addView(button, mLayoutParams);
}
@Override

View File

@ -413,6 +413,7 @@ RES_LAYOUT = \
res/layout/datetime_picker.xml \
res/layout/doorhangerpopup.xml \
res/layout/doorhanger.xml \
res/layout/doorhanger_button.xml \
res/layout/find_in_page_content.xml \
res/layout/font_size_preference.xml \
res/layout/gecko_appwidget.xml \

View File

@ -21,8 +21,13 @@
android:textColor="@color/doorhanger_text"
android:visibility="gone"/>
<View android:id="@+id/divider"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#FFD1D5DA"
android:visibility="gone"/>
<LinearLayout android:id="@+id/doorhanger_choices"
style="@android:style/ButtonBar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="48dip"
android:textColor="#FF222222"
android:textSize="14sp"
android:background="@drawable/action_bar_button"/>