Search in sources :

Example 1 with GlifLayout

use of com.google.android.setupdesign.GlifLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class MasterClear method setUpInitiateButton.

private void setUpInitiateButton() {
    if (mInitiateButton != null) {
        return;
    }
    final GlifLayout layout = mContentView.findViewById(R.id.setup_wizard_layout);
    final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class);
    mixin.setPrimaryButton(new FooterButton.Builder(getActivity()).setText(R.string.master_clear_button_text).setListener(mInitiateListener).setButtonType(ButtonType.OTHER).setTheme(R.style.SudGlifButton_Primary).build());
    mInitiateButton = mixin.getPrimaryButton();
}
Also used : GlifLayout(com.google.android.setupdesign.GlifLayout) FooterBarMixin(com.google.android.setupcompat.template.FooterBarMixin)

Example 2 with GlifLayout

use of com.google.android.setupdesign.GlifLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class MasterClearConfirm method establishFinalConfirmationState.

/**
 * Configure the UI for the final confirmation interaction
 */
private void establishFinalConfirmationState() {
    final GlifLayout layout = mContentView.findViewById(R.id.setup_wizard_layout);
    final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class);
    mixin.setPrimaryButton(new FooterButton.Builder(getActivity()).setText(R.string.master_clear_button_text).setListener(mFinalClickListener).setButtonType(ButtonType.OTHER).setTheme(R.style.SudGlifButton_Primary).build());
}
Also used : GlifLayout(com.google.android.setupdesign.GlifLayout) FooterBarMixin(com.google.android.setupcompat.template.FooterBarMixin)

Example 3 with GlifLayout

use of com.google.android.setupdesign.GlifLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class StorageWizardBase method setIcon.

protected void setIcon(int resId) {
    final GlifLayout layout = getGlifLayout();
    final Drawable icon = getDrawable(resId).mutate();
    icon.setTintList(Utils.getColorAccent(layout.getContext()));
    layout.setIcon(icon);
}
Also used : GlifLayout(com.google.android.setupdesign.GlifLayout) Drawable(android.graphics.drawable.Drawable)

Example 4 with GlifLayout

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

the class BiometricHandoffActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.biometric_handoff);
    setHeaderText(R.string.biometric_settings_hand_back_to_guardian);
    final GlifLayout layout = getLayout();
    mFooterBarMixin = layout.getMixin(FooterBarMixin.class);
    mFooterBarMixin.setPrimaryButton(getPrimaryFooterButton());
}
Also used : GlifLayout(com.google.android.setupdesign.GlifLayout) FooterBarMixin(com.google.android.setupcompat.template.FooterBarMixin)

Example 5 with GlifLayout

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

the class ForgotPasswordActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    int userId = getIntent().getIntExtra(Intent.EXTRA_USER_ID, -1);
    if (userId < 0) {
        Log.e(TAG, "No valid userId supplied, exiting");
        finish();
        return;
    }
    setContentView(R.layout.forgot_password_activity);
    final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
    layout.getMixin(FooterBarMixin.class).setPrimaryButton(new FooterButton.Builder(this).setText(android.R.string.ok).setListener(v -> finish()).setButtonType(FooterButton.ButtonType.DONE).setTheme(R.style.SudGlifButton_Primary).build());
    UserManager.get(this).requestQuietModeEnabled(false, UserHandle.of(userId), UserManager.QUIET_MODE_DISABLE_DONT_ASK_CREDENTIAL);
}
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