Bug 1147064 - Undeleted Layout inflation line. r=me

This commit is contained in:
Chenxia Liu 2015-06-02 13:37:40 -07:00
parent 68927aa118
commit 8dbf112697
4 changed files with 15 additions and 9 deletions

View File

@ -3,7 +3,10 @@
- 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/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@+id/doorhanger_message"
android:focusable="true"
@ -27,4 +30,4 @@
android:textColor="@color/placeholder_active_grey"
android:visibility="gone"/>
</merge>
</LinearLayout>

View File

@ -3,7 +3,10 @@
- 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/. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@+id/doorhanger_title"
android:layout_width="match_parent"
@ -26,4 +29,4 @@
android:layout_marginBottom="@dimen/doorhanger_section_padding_small"
android:visibility="gone"/>
</merge>
</LinearLayout>

View File

@ -73,12 +73,9 @@ public abstract class DoorHanger extends LinearLayout {
mIdentifier = config.getId();
mType = type;
LayoutInflater.from(context).inflate(R.layout.doorhanger, this);
setOrientation(VERTICAL);
final ViewStub contentStub = (ViewStub) findViewById(R.id.content);
contentStub.setLayoutResource(getContentResource());
contentStub.inflate();
mDivider = findViewById(R.id.divider_doorhanger);
mIcon = (ImageView) findViewById(R.id.doorhanger_icon);
@ -87,6 +84,10 @@ public abstract class DoorHanger extends LinearLayout {
mOnButtonClickListener = config.getButtonClickListener();
mDividerColor = mResources.getColor(R.color.divider_light);
final ViewStub contentStub = (ViewStub) findViewById(R.id.content);
contentStub.setLayoutResource(getContentResource());
contentStub.inflate();
}
protected abstract int getContentResource();

View File

@ -30,7 +30,6 @@ import org.json.JSONArray;
import org.mozilla.gecko.R;
import org.mozilla.gecko.favicons.Favicons;
import org.mozilla.gecko.favicons.OnFaviconLoadedListener;
import org.mozilla.gecko.toolbar.SiteIdentityPopup;
public class LoginDoorHanger extends DoorHanger {
private static final String LOGTAG = "LoginDoorHanger";