title: Android: pass a resource id as a parameter
body: <p>I have this code:</p>
  
  <pre><code>translateRight("iv1"); //iv1 is an id of an imageView
  
      private void translateRight(String st){
  
      ImageView img = (ImageView)findViewById(R.id.st);
          Animation a = AnimationUtils.loadAnimation(this, R.anim.translate_right);
          img.startAnimation(a);
      }
  </code></pre>
  
  <p>I have "translateRight" that is a method that show an animation, but at this method I should pass a resource id; I tried with a string but it don't work, what can I do?</p>