animation - How to create a Heart Pulse animtion in Android? -


i need have heart pulse animation in app such this or this. don't mind using external resource long i'm able control pulse rate. after googling many had suggested android.graphics.path should used have no idea of how should need.

so if knows how achieve such thing ?

you can add objectanimator this, creating pulsating effect in image

objectanimator scaledown = objectanimator.ofpropertyvaluesholder(imageview,                 propertyvaluesholder.offloat("scalex", 1.2f),                 propertyvaluesholder.offloat("scaley", 1.2f));         scaledown.setduration(300);          scaledown.setrepeatcount(objectanimator.infinite);         scaledown.setrepeatmode(objectanimator.reverse);          scaledown.start(); 

another way achive have customclass , override ondraw method, creating effect of growing or decrease increasing variable , recalling invalidate(). did these in post make button background grow, if want follow way can usefull you.

pulsating button android

have day!


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -