// Path: app/src/main/java/com/silver/dan/castdemo/SettingEnums/BackgroundType.java
// public enum BackgroundType {
//     SLIDESHOW(0, R.string.slideshow),
//     SOLID_COLOR(1, R.string.solid_color),
//     @Deprecated
//     PICTURE(2, R.string.picture),
//     PICASA_ALBUM(3, R.string.google_photos_album);
// 
//     private int value;
//     private int humanNameRes;
// 
//     BackgroundType(int value, int humanNameRes) {
//         this.value = value;
//         this.humanNameRes = humanNameRes;
//     }
// 
//     public int getValue() {
//         return value;
//     }
// 
//     public int getHumanNameRes() {
//         return humanNameRes;
//     }
// }
// 
// Path: app/src/main/java/com/silver/dan/castdemo/Util/ColorConverter.java
// public class ColorConverter {
//     public static String intToString(int color) {
//         return Integer.toHexString(color).substring(2);
//     }
// 
//     public static Integer stringToInt(String color) {
//         return Color.parseColor("#" + color);
//     }
// }


import android.content.Context;
import android.databinding.BaseObservable;
import android.databinding.Bindable;
import android.databinding.Observable;
import android.support.v4.content.ContextCompat;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.Exclude;
import com.google.firebase.database.FirebaseDatabase;
import com.silver.dan.castdemo.SettingEnums.BackgroundType;
import com.silver.dan.castdemo.Util.ColorConverter;
import java.util.HashMap;
    @Bindable
    public String backgroundGooglePhotosAlbumId;

    @Bindable
    public String backgroundGooglePhotosAlbumName;


    @Exclude
    public AppSettingsHelperFragment appSettings;

    static String COLUMN_COUNT = "COLUMN_COUNT";
    static String BACKGROUND_TYPE = "BACKGROUND_TYPE";
    static String BACKGROUND_COLOR = "BACKGROUND_COLOR";
    static String WIDGET_TRANSPARENCY = "WIDGET_TRANSPARENCY";
    static String WIDGET_COLOR = "WIDGET_COLOR";
    static String TEXT_COLOR = "TEXT_COLOR";
    static String SCREEN_PADDING = "SCREEN_PADDING";
    static String SLIDESHOW_INTERVAL = "SLIDESHOW_INTERVAL";
    static String BACKGROUND_GOOGLE_ALBUM_ID = "backgroundGooglePhotosAlbumId";
    static String BACKGROUND_GOOGLE_ALBUM_NAME = "backgroundGooglePhotosAlbumName";

    static String LOCALE = "LOCALE";
    static final String LANGUAGE_CODE = "LANGUAGE_CODE";

    public AppSettingsBindings() {
    }

    void initDefaults(Context context) {
        // default settings
        if (dashBackgroundColor == null)
// Path: app/src/main/java/com/silver/dan/castdemo/SettingEnums/BackgroundType.java
// public enum BackgroundType {
//     SLIDESHOW(0, R.string.slideshow),
//     SOLID_COLOR(1, R.string.solid_color),
//     @Deprecated
//     PICTURE(2, R.string.picture),
//     PICASA_ALBUM(3, R.string.google_photos_album);
// 
//     private int value;
//     private int humanNameRes;
// 
//     BackgroundType(int value, int humanNameRes) {
//         this.value = value;
//         this.humanNameRes = humanNameRes;
//     }
// 
//     public int getValue() {
//         return value;
//     }
// 
//     public int getHumanNameRes() {
//         return humanNameRes;
//     }
// }
// 
// Path: app/src/main/java/com/silver/dan/castdemo/Util/ColorConverter.java
// public class ColorConverter {
//     public static String intToString(int color) {
//         return Integer.toHexString(color).substring(2);
//     }
// 
//     public static Integer stringToInt(String color) {
//         return Color.parseColor("#" + color);
//     }
// }


// Path: app/src/main/java/com/silver/dan/castdemo/AppSettingsBindings.java
import android.content.Context;
import android.databinding.BaseObservable;
import android.databinding.Bindable;
import android.databinding.Observable;
import android.support.v4.content.ContextCompat;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.Exclude;
import com.google.firebase.database.FirebaseDatabase;
import com.silver.dan.castdemo.SettingEnums.BackgroundType;
import com.silver.dan.castdemo.Util.ColorConverter;
import java.util.HashMap;

    @Bindable
    public String backgroundGooglePhotosAlbumId;

    @Bindable
    public String backgroundGooglePhotosAlbumName;


    @Exclude
    public AppSettingsHelperFragment appSettings;

    static String COLUMN_COUNT = "COLUMN_COUNT";
    static String BACKGROUND_TYPE = "BACKGROUND_TYPE";
    static String BACKGROUND_COLOR = "BACKGROUND_COLOR";
    static String WIDGET_TRANSPARENCY = "WIDGET_TRANSPARENCY";
    static String WIDGET_COLOR = "WIDGET_COLOR";
    static String TEXT_COLOR = "TEXT_COLOR";
    static String SCREEN_PADDING = "SCREEN_PADDING";
    static String SLIDESHOW_INTERVAL = "SLIDESHOW_INTERVAL";
    static String BACKGROUND_GOOGLE_ALBUM_ID = "backgroundGooglePhotosAlbumId";
    static String BACKGROUND_GOOGLE_ALBUM_NAME = "backgroundGooglePhotosAlbumName";

    static String LOCALE = "LOCALE";
    static final String LANGUAGE_CODE = "LANGUAGE_CODE";

    public AppSettingsBindings() {
    }

    void initDefaults(Context context) {
        // default settings
        if (dashBackgroundColor == null)
            dashBackgroundColor = ColorConverter.intToString(ContextCompat.getColor(context, R.color.tv_background));