Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BrandedDeleteAlertDialogBuilder.java « branding « notes « owncloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e50b6fcba26e8e52b68d1229e32ffbc480d4ae72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package it.niedermann.owncloud.notes.branding;

import android.content.Context;
import android.content.DialogInterface;
import android.widget.Button;

import androidx.annotation.CallSuper;

import it.niedermann.owncloud.notes.R;

public class BrandedDeleteAlertDialogBuilder extends BrandedAlertDialogBuilder {

    public BrandedDeleteAlertDialogBuilder(Context context) {
        super(context);
    }

    @CallSuper
    @Override
    public void applyBrand(int mainColor, int textColor) {
        super.applyBrand(mainColor, textColor);
        final var positiveButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
        if (positiveButton != null) {
            positiveButton.setTextColor(getContext().getResources().getColor(R.color.bg_attention));
        }
    }
}