Merge "Fix TrustedCredentialsSettings for small screens"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9a2ffdce98
@@ -13,22 +13,11 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<LinearLayout
|
||||
<Button
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
>
|
||||
<FrameLayout
|
||||
android:id="@+id/cert_details"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/cert_remove_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_margin="6dip"
|
||||
/>
|
||||
</LinearLayout>
|
||||
android:id="@+id/cert_remove_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_margin="6dip"
|
||||
/>
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user