unit of value in TypedValue.applyDimension
<p>We using <a href="http://developer.android.com/reference/android/util/TypedValue.html#applyDimension%28int,%20float,%20android.util.DisplayMetrics%29%20TypedValue" rel="nofollow"><code>TypedValue</code></a> to covert screen unit to each other in android. </p>

<blockquote>
  <p><code>public static float applyDimension (int unit, float value, DisplayMetrics metrics)</code></p>
  
  <p>Converts an unpacked complex data value holding a dimension to its final floating point value. The two parameters unit and value are as in TYPE_DIMENSION.
  Parameters</p>
  
  <ul>
  <li><strong>unit</strong> The unit to convert from.</li>
  <li><strong>value</strong> The value to apply the unit to.</li>
  <li><strong>metrics</strong> Current display metrics to use in the conversion -- supplies display density and scaling information.</li>
  <li><strong>Returns</strong> The complex floating point value multiplied by the appropriate metrics depending on its unit. </li>
  </ul>
</blockquote>

<p>My question is:</p>

<p>How can it possible to know the <strong>original unit</strong> of the parameter <strong>value</strong>? <br>
Sometimes it was px, and other examples put dp there, and even someone mm ?!</p>

<p>I want to do some unit conversion with fully flexable, so I want to know exactly.</p>
