0

I'm animating 20 images using Animation Drawable,i set up an XML layout in my drawable folder containing the images and animation duration, and a JAVA class that contains the commands. I tried a lot to find the errors, i reduce the size of my images but still won't work, until I saw one line on my java class that has an Red Exclamation mark on the line code.

imageViews.setBackgroundResource(R.drawable.anim_intro_wholenum);

below is my java class, the RED EXCLAMATION MARK on the left is what i'm talking about. I can't find any dialogue to show what's the problem, I try Alt + Enter but nothing shows. i'm sure it's indicating the Line #31 of my code. I try to remove the line # 31 and run my app, and the activity is working, but there is no setBackgroundResource so there's nothing to touch and animate. Can anyone help me? i'm having a hard time on this. thank you

enter image description here

1 Answer 1

1

First, you should use OnClickListener instead of calling onTouchListener which will call x2 times on animation.start.

Second, here are some useful links you can use:

similaier questions: Link 1 Link 2 Android animation docs: Link 3

Sign up to request clarification or add additional context in comments.

1 Comment

still not working sir, it says expected source of type is drawable

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.