Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need your help #29

Closed
xmavara opened this issue Aug 1, 2017 · 1 comment
Closed

need your help #29

xmavara opened this issue Aug 1, 2017 · 1 comment

Comments

@xmavara
Copy link

xmavara commented Aug 1, 2017

hi,
i'm using awesome sdp library in my apps, but i need your help!
i found no way to contact you, that's why i posted here.
i want to convert dp to pixel or pixel to dp programmatically but the result is not good!
i tried different ways but none of these codes results is not like sdp library.
float px = dp * (metrics.densityDpi / metrics.DENSITY_DEFAULT);
or
float px = dp * getResources().getDisplayMetrics().density; + 0.5f;
....
can you help me?
many thanks

@xmavara xmavara closed this as completed Aug 3, 2017
@Kovartthan
Copy link

how do you solved your issues @xmavara in dp to pixel conversion .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants