I have this 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);
}
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?
Resource id – is an integer value. Just pass an
int: