Dimens-for-different-screens-in-Android

The code is pretty straightforward. Taking XHDPI as the scale (1.0), I've used factors for conversion of every screen in accordance with this official link: https://developer.android.com/guide/practices/screens_support.html

Feel free to edit the factors at your own needs. Here's how to use the code:

  1. Run it in any java IDE
  2. Specify the location of the project in the console when asked (There might be some file I/O exceptions, and in that case, you can manually enter the full location of the file in the code)
  3. Specify which dimension you want as output
  4. Copy and paste the output in your required dimens.xml file

NOTE: This is my first code for community. Pardon if it's too naive.