Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;

import android.content.res.TypedArray;
import android.util.TypedValue;

public class Main {
    public static int getAccentColor(Context context) {
        TypedValue typedValue = new TypedValue();
        TypedArray typedArray = context.obtainStyledAttributes(typedValue.data, new int[] { 16843829 });
        int accent = typedArray.getColor(0, 0);
        typedArray.recycle();
        return accent;
    }
}