Here's my situation. I have an ImageView that I've ObjectAnimated towards the bottom of the screen. I've used ObjectAnimator due to its ability to transfer all properties of the ImageView with it, instead of being just the image itself. My problem is, I'm trying to set it up so that when I click on the ImageView, depending if the situation is true/false, it'll set the bottom margin like so:
((RelativeLayout.LayoutParams) ImageView.getLayoutParams()).bottomMargin = isSelected ? 95: 80;
At first I figured that the condition wasn't met, but I tested it and that's not the issue at all. I'm thinking it has to do with the LayoutParams after using ObjectAnimator. Do I need to reestablish new LayoutParams after the ObjectAnimator has finished? If so, how do I go about this?
0 comments:
Post a Comment