зеркало из https://github.com/mozilla/gecko-dev.git
Bug 847578: Reduce redundant views in site identity popup. [r=mfinkle]
--HG-- extra : rebase_source : 8c85017a16f09ec47d5845d9d66d1ce2af31f4ad
This commit is contained in:
Родитель
3c2b79a84a
Коммит
9dd706e89b
|
@ -76,9 +76,7 @@ public class SiteIdentityPopup extends PopupWindow {
|
|||
|
||||
mHost = (TextView) layout.findViewById(R.id.host);
|
||||
mOwner = (TextView) layout.findViewById(R.id.owner);
|
||||
mSupplemental = (TextView) layout.findViewById(R.id.supplemental);
|
||||
mVerifier = (TextView) layout.findViewById(R.id.verifier);
|
||||
mEncrypted = (TextView) layout.findViewById(R.id.encrypted);
|
||||
|
||||
mLarry = (ImageView) layout.findViewById(R.id.larry);
|
||||
mArrow = (ImageView) layout.findViewById(R.id.arrow);
|
||||
|
@ -120,38 +118,32 @@ public class SiteIdentityPopup extends PopupWindow {
|
|||
mHost.setText(host);
|
||||
|
||||
String owner = identityData.getString("owner");
|
||||
|
||||
try {
|
||||
String supplemental = identityData.getString("supplemental");
|
||||
owner += "\n" + supplemental;
|
||||
} catch (JSONException e) { }
|
||||
|
||||
mOwner.setText(owner);
|
||||
|
||||
String verifier = identityData.getString("verifier");
|
||||
mVerifier.setText(verifier);
|
||||
|
||||
String encrypted = identityData.getString("encrypted");
|
||||
mEncrypted.setText(encrypted);
|
||||
mVerifier.setText(verifier + "\n" + encrypted);
|
||||
} catch (JSONException e) {
|
||||
Log.e(LOGTAG, "Exception trying to get identity data", e);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String supplemental = identityData.getString("supplemental");
|
||||
mSupplemental.setText(supplemental);
|
||||
mSupplemental.setVisibility(View.VISIBLE);
|
||||
} catch (JSONException e) {
|
||||
mSupplemental.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (mode.equals(VERIFIED)) {
|
||||
// Use a blue theme for SSL
|
||||
mLarry.setImageResource(R.drawable.larry_blue);
|
||||
mHost.setTextColor(mResources.getColor(R.color.identity_verified));
|
||||
mOwner.setTextColor(mResources.getColor(R.color.identity_verified));
|
||||
mSupplemental.setTextColor(mResources.getColor(R.color.identity_verified));
|
||||
} else {
|
||||
// Use a green theme for EV
|
||||
mLarry.setImageResource(R.drawable.larry_green);
|
||||
mHost.setTextColor(mResources.getColor(R.color.identity_identified));
|
||||
mOwner.setTextColor(mResources.getColor(R.color.identity_identified));
|
||||
mSupplemental.setTextColor(mResources.getColor(R.color.identity_identified));
|
||||
}
|
||||
|
||||
int[] anchorLocation = new int[2];
|
||||
|
|
|
@ -42,11 +42,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<TextView android:id="@+id/supplemental"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<TextView android:id="@+id/verifier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -54,12 +49,6 @@
|
|||
android:textColor="@color/doorhanger_text"
|
||||
android:paddingTop="12dip"/>
|
||||
|
||||
<TextView android:id="@+id/encrypted"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/doorhanger_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView android:id="@+id/larry"
|
||||
|
|
|
@ -42,11 +42,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<TextView android:id="@+id/supplemental"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
<TextView android:id="@+id/verifier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -54,12 +49,6 @@
|
|||
android:textColor="@color/doorhanger_text"
|
||||
android:paddingTop="12dip"/>
|
||||
|
||||
<TextView android:id="@+id/encrypted"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/doorhanger_text"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView android:id="@+id/larry"
|
||||
|
|
Загрузка…
Ссылка в новой задаче