private int dp2px(int dpValue){ float scale = this.getResources().getDisplayMetrics().density; return (int) (dpValue*scale); }