Bug 1177576 - Update styling for Owner text. r=ally
authorChenxia Liu <liuche@mozilla.com>
Tue, 21 Jul 2015 18:28:48 -0700
changeset 286885 58c7a17a21c24a7fa70d93e5699d30f75a6895ac
parent 286884 64726ba3ceed54d76207b50eaeb48a54bd75c7a0
child 286886 137551feecddf9610fb3c2d96fe68fd9ea4a42ea
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersally
bugs1177576
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1177576 - Update styling for Owner text. r=ally
mobile/android/base/resources/layout/site_identity.xml
mobile/android/base/toolbar/SiteIdentityPopup.java
--- a/mobile/android/base/resources/layout/site_identity.xml
+++ b/mobile/android/base/resources/layout/site_identity.xml
@@ -49,24 +49,29 @@
 
             <LinearLayout android:id="@+id/site_identity_known_container"
                           android:layout_width="match_parent"
                           android:layout_height="wrap_content"
                           android:visibility="gone"
                           android:orientation="vertical">
 
                 <TextView android:id="@+id/owner"
-                          android:layout_width="wrap_content"
+                          android:layout_width="match_parent"
                           android:layout_height="wrap_content"
-                          android:layout_marginBottom="@dimen/doorhanger_section_padding_medium"
                           android:textAppearance="@style/TextAppearance.DoorHanger.Medium"
                           android:textStyle="bold"/>
 
+                <TextView android:id="@+id/owner_supplemental"
+                          android:layout_width="match_parent"
+                          android:layout_height="wrap_content"
+                          android:layout_marginBottom="@dimen/doorhanger_section_padding_medium"
+                          android:textAppearance="@style/TextAppearance.DoorHanger.Medium"/>
+
                 <TextView android:id="@+id/verifier"
-                          android:layout_width="wrap_content"
+                          android:layout_width="match_parent"
                           android:layout_height="wrap_content"
                           android:textAppearance="@style/TextAppearance.DoorHanger.Medium.Light"/>
 
             </LinearLayout>
             <TextView android:id="@+id/site_settings_link"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       android:textAppearance="@style/TextAppearance.DoorHanger.Medium"
--- a/mobile/android/base/toolbar/SiteIdentityPopup.java
+++ b/mobile/android/base/toolbar/SiteIdentityPopup.java
@@ -67,16 +67,17 @@ public class SiteIdentityPopup extends A
 
     private LinearLayout mIdentityKnownContainer;
 
     private ImageView mIcon;
     private TextView mTitle;
     private TextView mSecurityState;
     private TextView mMixedContentActivity;
     private TextView mOwner;
+    private TextView mOwnerSupplemental;
     private TextView mVerifier;
     private TextView mSiteSettingsLink;
 
     private View mDivider;
 
     private DoorHanger mTrackingContentNotification;
     private DoorHanger mSelectLoginDoorhanger;
 
@@ -108,16 +109,17 @@ public class SiteIdentityPopup extends A
                 (LinearLayout) mIdentity.findViewById(R.id.site_identity_known_container);
 
         mIcon = (ImageView) mIdentity.findViewById(R.id.site_identity_icon);
         mTitle = (TextView) mIdentity.findViewById(R.id.site_identity_title);
         mSecurityState = (TextView) mIdentity.findViewById(R.id.site_identity_state);
         mMixedContentActivity = (TextView) mIdentity.findViewById(R.id.mixed_content_activity);
 
         mOwner = (TextView) mIdentityKnownContainer.findViewById(R.id.owner);
+        mOwnerSupplemental = (TextView) mIdentityKnownContainer.findViewById(R.id.owner_supplemental);
         mVerifier = (TextView) mIdentityKnownContainer.findViewById(R.id.verifier);
         mDivider = mIdentity.findViewById(R.id.divider_doorhanger);
 
         mSiteSettingsLink = (TextView) mIdentity.findViewById(R.id.site_settings_link);
     }
 
     private void updateIdentity(final SiteIdentity siteIdentity) {
         if (!mInflated) {
@@ -316,25 +318,29 @@ public class SiteIdentityPopup extends A
             mSecurityState.setCompoundDrawablePadding(0);
         }
     }
 
     private void updateIdentityInformation(final SiteIdentity siteIdentity) {
         String owner = siteIdentity.getOwner();
         if (owner == null) {
             mOwner.setVisibility(View.GONE);
+            mOwnerSupplemental.setVisibility(View.GONE);
         } else {
             mOwner.setVisibility(View.VISIBLE);
+            mOwner.setText(owner);
 
             // Supplemental data is optional.
             final String supplemental = siteIdentity.getSupplemental();
             if (!TextUtils.isEmpty(supplemental)) {
-                owner += "\n" + supplemental;
+                mOwnerSupplemental.setText(supplemental);
+                mOwnerSupplemental.setVisibility(View.VISIBLE);
+            } else {
+                mOwnerSupplemental.setVisibility(View.GONE);
             }
-            mOwner.setText(owner);
         }
 
         final String verifier = siteIdentity.getVerifier();
         mVerifier.setText(verifier);
     }
 
     private void addTrackingContentNotification(boolean blocked) {
         // Remove any existing tracking content notification.