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

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

import android.content.Context;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import static it.niedermann.nextcloud.deck.ui.branding.BrandingUtil.isBrandingEnabled;
import static it.niedermann.nextcloud.deck.ui.branding.BrandingUtil.readBrandMainColor;

public abstract class BrandedFragment extends Fragment implements Branded {

    @Override
    public void onStart() {
        super.onStart();

        @Nullable Context context = getContext();
        if (context != null && isBrandingEnabled(context)) {
            applyBrand(readBrandMainColor(context));
        }
    }
}