title: Is the duration specified in an XML-defined animation truly in milliseconds?
body: <p>I'm using the latest version of the support library to allow the use of Fragments on devices running versions of Android &lt; 3.0.  Any time I want to switch the current fragment I do so using this code:</p>
  
  <pre><code>public void displayFragmentInMainView(Fragment f) {
      FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
  
      transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left,
              android.R.anim.slide_in_left, android.R.anim.slide_out_right);
      transaction.replace(R.id.fragment_holder, f);
  
      transaction.commit();
  }
  </code></pre>
  
  <p>Here is the XML which defines one of the transition animations:</p>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;translate android:fromXDelta="-50%p" android:toXDelta="0"
          android:duration="500"/&gt;
  &lt;alpha android:fromAlpha="0.0" android:toAlpha="1.0"
          android:duration="500" /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>As you can see in the XML above, the duration for the animation is set to 500.  According to the developer docs, the units specified here are in ms (a measure of time).</p>
  
  <p>I've noticed through testing that the animation duration is different between devices.  Why is this the case, if I'm specifying a ms value for the duration?</p>
  
  <p>Here are the devices I've tested on, and the results (subjective):</p>
  
  <p><b>HTC Legend</b>: (low-end phone with a slow CPU, Android 2.3.3) animation is smooth and lasts exactly as long as I would like it to.</p>
  
  <p><b>Samsung Galaxy S</b>: (mid-range CPU, Android 2.1) animation is somewhat choppy and goes faster than on the Legend</p>
  
  <p><b>Emulator</b>: (running on a quad-core iMac, Android 4.0) animation is VERY fast, sometimes so fast that you don't even see it</p>
  
  <p>Based on this it seems that the duration is not truly measured in terms of ms but is dependent on CPU speed.  Has anyone else noticed similar results?  Is there a way to set it up so that the animation speed will be uniform across devices as would be expected after reading the docs?</p>