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 TypedValue getValue(Context context, int attr) {
        TypedArray ta = context.obtainStyledAttributes(new int[] { attr });
        TypedValue tv = new TypedValue();
        boolean bool = ta.getValue(0, tv);
        ta.recycle();
        if (bool == true)
            return tv;

        return null;
    }
}