// Path: outlay/app/src/main/java/app/outlay/view/OutlayTheme.java
// public class OutlayTheme {
//     public final int activeIconColor;
//     public final int inactiveIconColor;
// 
//     public final int primaryTextColor;
//     public final int secondaryTextColor;
// 
//     public final int backgroundDarkColor;
//     public final int backgroundColor;
// 
// 
//     public OutlayTheme(
//             Activity context,
//             int themeId
//     ) {
//         int[] textSizeAttr = new int[]{
//                 R.attr.activeIconColor,
//                 R.attr.textColorPrimary,
//                 R.attr.inactiveIconColor,
//                 R.attr.textColorSecondary,
//                 R.attr.backgroundDarkColor,
//                 R.attr.backgroundColor
//         };
//         TypedArray a = context.obtainStyledAttributes(themeId, textSizeAttr);
//         activeIconColor = a.getColor(0, -1);
//         primaryTextColor = a.getColor(1, -1);
//         inactiveIconColor = a.getColor(2, -1);
//         secondaryTextColor = a.getColor(3, -1);
//         backgroundDarkColor = a.getColor(4, -1);
//         backgroundColor = a.getColor(5, -1);
//         a.recycle();
//     }
// }


import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import com.github.johnkil.print.PrintDrawable;
import app.outlay.view.OutlayTheme;
package app.outlay.utils;




/**
 * Created by bmelnychuk on 5/18/17.
 */

public class ResourceHelper {
    private Activity context;
    private OutlayTheme theme;

    public ResourceHelper(
            OutlayTheme theme,
            Activity context
    ) {
        this.theme = theme;
        this.context = context;
    }

    public Drawable getMaterialToolbarIcon(int iconResId) {
        return new PrintDrawable.Builder(context)
                .iconTextRes(iconResId)
                .iconFont("fonts/material-icon-font.ttf")
                .iconColor(theme.activeIconColor)
                .iconSizeRes(app.outlay.R.dimen.toolbar_icon_size)
                .build();
    }

    public Drawable getCustomToolbarIcon(int codeResId) {
        return new PrintDrawable.Builder(context)
                .iconCodeRes(codeResId)
                .iconFont("fonts/font-outlay.ttf")
                .iconColor(theme.activeIconColor)
// Path: outlay/app/src/main/java/app/outlay/view/OutlayTheme.java
// public class OutlayTheme {
//     public final int activeIconColor;
//     public final int inactiveIconColor;
// 
//     public final int primaryTextColor;
//     public final int secondaryTextColor;
// 
//     public final int backgroundDarkColor;
//     public final int backgroundColor;
// 
// 
//     public OutlayTheme(
//             Activity context,
//             int themeId
//     ) {
//         int[] textSizeAttr = new int[]{
//                 R.attr.activeIconColor,
//                 R.attr.textColorPrimary,
//                 R.attr.inactiveIconColor,
//                 R.attr.textColorSecondary,
//                 R.attr.backgroundDarkColor,
//                 R.attr.backgroundColor
//         };
//         TypedArray a = context.obtainStyledAttributes(themeId, textSizeAttr);
//         activeIconColor = a.getColor(0, -1);
//         primaryTextColor = a.getColor(1, -1);
//         inactiveIconColor = a.getColor(2, -1);
//         secondaryTextColor = a.getColor(3, -1);
//         backgroundDarkColor = a.getColor(4, -1);
//         backgroundColor = a.getColor(5, -1);
//         a.recycle();
//     }
// }


// Path: outlay/app/src/main/java/app/outlay/utils/ResourceHelper.java
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import com.github.johnkil.print.PrintDrawable;
import app.outlay.view.OutlayTheme;

package app.outlay.utils;




/**
 * Created by bmelnychuk on 5/18/17.
 */

public class ResourceHelper {
    private Activity context;
    private OutlayTheme theme;

    public ResourceHelper(
            OutlayTheme theme,
            Activity context
    ) {
        this.theme = theme;
        this.context = context;
    }

    public Drawable getMaterialToolbarIcon(int iconResId) {
        return new PrintDrawable.Builder(context)
                .iconTextRes(iconResId)
                .iconFont("fonts/material-icon-font.ttf")
                .iconColor(theme.activeIconColor)
                .iconSizeRes(app.outlay.R.dimen.toolbar_icon_size)
                .build();
    }

    public Drawable getCustomToolbarIcon(int codeResId) {
        return new PrintDrawable.Builder(context)
                .iconCodeRes(codeResId)
                .iconFont("fonts/font-outlay.ttf")
                .iconColor(theme.activeIconColor)
                .iconSizeRes(app.outlay.R.dimen.toolbar_icon_size)