get Dimension from resource - Android App

Android examples for App:Resource

Description

get Dimension from resource

Demo Code


//package com.java2s;

import android.content.Context;

public class Main {
    public static float getDimension(Context context, int resId) {
        return context.getResources().getDimension(resId);
    }//  w  w w. j  av  a2 s.com
}

Related Tutorials