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);
}
Aggregations