SyntaxFix
Write A Post
Hire A Developer
Questions
To convert dp to px this code can be helpful :
dp to px
public static int dpToPx(Context context, int dp) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dp * scale + 0.5f); }