Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.res.Resources;

public class Main {
    public static int loadThemeColor(Resources themeResources, String resourceName, String themePackage) {
        int color = 0;
        int resource_id = themeResources.getIdentifier(resourceName, "color", themePackage);
        if (resource_id != 0) {
            color = themeResources.getColor(resource_id);
        }

        return color;

    }
}