I am new to Android Studio so maybe my intended solution will not be the best to achieve my goal however here it goes:
Background: I have an app that basically deals a random playing card when a button is clicked. The card is an ImageView with a transition animation (an ObjectAnimator that just moves the ImageView from one postion on the screen to another, and back). I have a png image for each card in a 52 card deck in the drawable folder. The card image resource for the ImageView changes for each random card.
Issue: When I use card images that are simple and have small resolutions the animation is smooth. However, when I use 'fancier' card images with higher resolutions and larger dimensions, the animation slows down/lags.
I believe part of the problem is that the card image has to scale to fit the ImageView every time a card is dealt.
Question: Is there a way to scale all 52 card images to fit the ImageView before actually dealing any cards (like when the app loads?)?