Search in sources :

Example 11 with GlifLayout

use of com.google.android.setupdesign.GlifLayout in project android_packages_apps_Settings by omnirom.

the class InstallCaCertificateWarning method onCreate.

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTheme(SetupWizardUtils.getTheme(this, getIntent()));
    ThemeHelper.trySetDynamicColor(this);
    setContentView(R.layout.ca_certificate_warning_dialog);
    getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
    final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
    layout.setHeaderText(R.string.ca_certificate_warning_title);
    final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class);
    mixin.setSecondaryButton(new FooterButton.Builder(this).setText(R.string.certificate_warning_install_anyway).setListener(installCaCertificate()).setButtonType(FooterButton.ButtonType.OTHER).setTheme(R.style.SudGlifButton_Secondary).build());
    mixin.getSecondaryButtonView().setFilterTouchesWhenObscured(true);
    mixin.setPrimaryButton(new FooterButton.Builder(this).setText(R.string.certificate_warning_dont_install).setListener(returnToInstallCertificateFromStorage()).setButtonType(FooterButton.ButtonType.NEXT).setTheme(R.style.SudGlifButton_Primary).build());
    mixin.getPrimaryButtonView().setFilterTouchesWhenObscured(true);
}
Also used : GlifLayout(com.google.android.setupdesign.GlifLayout) FooterBarMixin(com.google.android.setupcompat.template.FooterBarMixin)

Aggregations

GlifLayout (com.google.android.setupdesign.GlifLayout)11 FooterBarMixin (com.google.android.setupcompat.template.FooterBarMixin)8 Intent (android.content.Intent)2 Drawable (android.graphics.drawable.Drawable)2 MessageFormat (android.icu.text.MessageFormat)1 RequireScrollMixin (com.google.android.setupdesign.template.RequireScrollMixin)1 HashMap (java.util.HashMap)1