Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

public class Main {
    /**
     * gets color from resource values
     *
     * @param context context of calling activity
     * @param colorId resource id
     * @return color id
     */
    public static int getColorResource(Context context, int colorId) {
        return context.getResources().getColor(colorId);
    }
}