I have this code:
translateRight("iv1");
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", this is a method that shows the animation, but with this method I have to pass the resource identifier; I tried with a string, but this does not work, what can I do?
source
share