Android examples for App:Resource
get Resource Color
//package com.java2s; import android.content.Context; public class Main { public static int getResourceColor(Context con, int colorId) { if (con != null && colorId > 0) { return con.getResources().getColor(colorId); }//from w ww. j ava2 s . c o m return -1; } }