diff --git a/mobile/android/base/DoorHanger.java b/mobile/android/base/DoorHanger.java index 34bc7a45620..0bd8d2994e4 100644 --- a/mobile/android/base/DoorHanger.java +++ b/mobile/android/base/DoorHanger.java @@ -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 diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index f6785a10a6c..f2c51b3aa96 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -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 \ diff --git a/mobile/android/base/resources/layout/doorhanger.xml b/mobile/android/base/resources/layout/doorhanger.xml index ea1b136b8a2..8de107364d7 100644 --- a/mobile/android/base/resources/layout/doorhanger.xml +++ b/mobile/android/base/resources/layout/doorhanger.xml @@ -21,8 +21,13 @@ android:textColor="@color/doorhanger_text" android:visibility="gone"/> + + + + +