Android Open Source - material-dialogs Theme Singleton






From Project

Back to project page material-dialogs.

License

The source code is released under:

MIT License

If you think the Android project material-dialogs listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.afollestad.materialdialogs;
// ww w .j  a v  a2s  .  c o  m
import android.graphics.drawable.Drawable;

/**
 * Use of this is discouraged for now; for internal use only. See the Global Theming section of the README.
 */
public class ThemeSingleton {

    private static ThemeSingleton singleton;

    public static ThemeSingleton get(boolean createIfNull) {
        if (singleton == null && createIfNull)
            singleton = new ThemeSingleton();
        return singleton;
    }

    public static ThemeSingleton get() {
        return get(true);
    }

    public boolean darkTheme = false;
    public int titleColor = 0;
    public int contentColor = 0;
    public int accentColor = 0;
    public int itemColor = 0;
    public Drawable icon = null;
    public int backgroundColor = 0;
    public int dividerColor = 0;
    public Drawable selector;
    public Drawable btnSelector;
}




Java Source Code List

com.afollestad.materialdialogs.ApplicationTest.java
com.afollestad.materialdialogs.DialogAction.java
com.afollestad.materialdialogs.GravityEnum.java
com.afollestad.materialdialogs.MaterialDialogCompat.java
com.afollestad.materialdialogs.MaterialDialog.java
com.afollestad.materialdialogs.ThemeSingleton.java
com.afollestad.materialdialogs.Theme.java
com.afollestad.materialdialogs.base.DialogBase.java
com.afollestad.materialdialogs.util.DialogUtils.java
com.afollestad.materialdialogs.util.RecyclerUtil.java
com.afollestad.materialdialogs.util.TypefaceHelper.java
com.afollestad.materialdialogssample.ApplicationTest.java
com.afollestad.materialdialogssample.ButtonItemAdapter.java
com.afollestad.materialdialogssample.ColorChooserDialog.java
com.afollestad.materialdialogssample.FolderSelectorDialog.java
com.afollestad.materialdialogssample.MainActivity.java