public static int getpToPx(Context context, int dp) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics());
}
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics());
}
'안드로이드' 카테고리의 다른 글
안드로이드 PulltoRefresh 당겨서 새로고침 (0) | 2017.03.06 |
---|---|
안드로이드 문자 수신시 앱에서 문자 캐칭 (0) | 2017.03.06 |
안드로이드 내부 저장소 용량 구하기 (0) | 2017.03.06 |
안드로이드 RecyclerView 사용하기 예제 (0) | 2017.03.06 |
공유 가능 앱 리스트 가져오기 (0) | 2017.03.06 |