Android examples for Graphics:Color Operation
get System Attribute Color
//package com.java2s; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; public class Main { public static ColorStateList getSystemAttrColor(Context context, int attr) { TypedArray a = context.obtainStyledAttributes(new int[] { attr }); ColorStateList color = a.getColorStateList(a.getIndex(0)); a.recycle();/*from w w w . j av a 2s. co m*/ return color; } }