|
|
@ -6,9 +6,7 @@ import android.util.TypedValue;
|
|
|
|
import android.view.Display;
|
|
|
|
import android.view.Display;
|
|
|
|
import android.view.WindowManager;
|
|
|
|
import android.view.WindowManager;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Created by yangjinxiao on 2016/7/3.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class Util {
|
|
|
|
public class Util {
|
|
|
|
public static float dp2px(int dpVal, Context context) {
|
|
|
|
public static float dp2px(int dpVal, Context context) {
|
|
|
|
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dpVal, context.getResources().getDisplayMetrics());
|
|
|
|
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dpVal, context.getResources().getDisplayMetrics());
|
|
|
|