SyntaxFix
Write A Post
Hire A Developer
Questions
For DP to Pixel
DP to Pixel
Create a value in dimens.xml
dimens.xml
<dimen name="textSize">20dp</dimen>
Get that value in pixel as:
pixel
int sizeInPixel = context.getResources().getDimensionPixelSize(R.dimen.textSize);