package com.sheep.gamegroup.util;

import android.util.TypedValue;

import com.sheep.jiuyan.samllsheep.SheepApp;

/**
 * Created by realicing on 2018/11/22.
 * realicing@sina.com
 */
public class ResourceUtils {
    private static TypedValue mTmpValue = new TypedValue();

    private ResourceUtils(){}

    public static int getXmlDef(int id){
        synchronized (mTmpValue) {
            TypedValue value = mTmpValue;
            SheepApp.getInstance().getResources().getValue(id, value, true);
            return (int)TypedValue.complexToFloat(value.data);
        }
    }
}
