Convert DP To Pixel And Vice Versa

User Muhammad Nabeel Arif in the StackOverflow forum provided a good working code to convert DP to Pixel and vice versa.

It is up to you if you want to keep the value returned as a float. I wanted to have it returned as an int, hence the cast.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *