From 91615cfa9ead46769ad3adc624b3bacb4906e4b2 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Thu, 30 Jun 2011 10:41:02 -0700 Subject: Fix TrustedCredentialsSettings for small screens Change-Id: I01149a88b044d0f95db01039aabba62666e8f397 --- src/com/android/settings/TrustedCredentialsSettings.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/com') diff --git a/src/com/android/settings/TrustedCredentialsSettings.java b/src/com/android/settings/TrustedCredentialsSettings.java index 340e93d..3e50440 100644 --- a/src/com/android/settings/TrustedCredentialsSettings.java +++ b/src/com/android/settings/TrustedCredentialsSettings.java @@ -309,7 +309,7 @@ public class TrustedCredentialsSettings extends Fragment { } private void showCertDialog(final CertHolder certHolder) { - View view = View.inflate(getActivity(), R.layout.trusted_credential_details, null); + View view = certHolder.mSslCert.inflateCertificateView(getActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(com.android.internal.R.string.ssl_certificate); builder.setView(view); @@ -320,10 +320,12 @@ public class TrustedCredentialsSettings extends Fragment { }); final Dialog certDialog = builder.create(); - FrameLayout details = (FrameLayout) view.findViewById(R.id.cert_details); - details.addView(certHolder.mSslCert.inflateCertificateView(getActivity())); - - Button removeButton = (Button) view.findViewById(R.id.cert_remove_button); + ViewGroup body = (ViewGroup) view.findViewById(com.android.internal.R.id.body); + LayoutInflater inflater = LayoutInflater.from(getActivity()); + Button removeButton = (Button) inflater.inflate(R.layout.trusted_credential_details, + body, + false); + body.addView(removeButton); removeButton.setText(certHolder.mTab.getButtonLabel(certHolder)); removeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { -- cgit v1.1