top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

I want to add a bouncing effect on imageview below api 11. How should I do it?

0 votes
94 views

In an app there is a floating icon of download. I just want, when I open that page icon should come in screen with bouncing effect. App supporting api version > 8.

Please help.

posted Aug 12, 2014 by Manav

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

For api > 10 u can use it as.

ObjectAnimator animY = ObjectAnimator.ofFloat(imgView, "translationY", -500f, 0f);
                        animY.setDuration(1500);//1.5sec
                        animY.setInterpolator(new BounceInterpolator());
                        animY.setRepeatCount(0);
                        animY.start()

For api < 11 u can use it as:

 TranslateAnimation animation = new TranslateAnimation(
                                Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
                                Animation.RELATIVE_TO_SELF, -3.0f, Animation.RELATIVE_TO_SELF, 0.0f
                            );
                            animation.setDuration(1500);
                            animation.setInterpolator(new BounceInterpolator());
                            imgView.startAnimation(animation);
answer Aug 12, 2014 by Nikhil Omar
Similar Questions
+3 votes

I need to change the Wifi channel programmatically (Of course, I will enable the Wifi to function as Hotsopt first).
Is there any API/Driver in the source code that I can use?

+1 vote

I need to inbuilt BarCode/QR Code scanning feature in one of my android application. I've one api of Zxing ( https://github.com/zxing/zxing) but required some other option.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...