get Color from Content by id - Android android.graphics

Android examples for android.graphics:Color

Description

get Color from Content by id

Demo Code

import android.content.Context;

public class Main {

  public static int getColor(Context context, final int mColorId) {
    return context.getResources().getColor(mColorId);
  }//from  www.  j  a  v  a 2  s  . c  om

}

Related Tutorials