Android examples for User Interface:View Property
get View Elevation
//package com.java2s; import android.content.Context; public class Main { public static float getElevation(Context context, float degree) { return context.getResources().getDisplayMetrics().density * degree; }/*from w w w . java2 s . c om*/ public static float getElevation(Context context, int degree) { return context.getResources().getDisplayMetrics().density * degree; } }