android - How can I use AlphaAnimation on a bitmap pre API 11 -
this link shows how use alphaanimation on view pre api 11.
what have animate works api 11 , above.
objectanimator fader = objectanimator.ofint(paint1,"alpha", 250, 00); fader.setduration(1000); fader.setrepeatcount(0); fader.setrepeatmode(valueanimator.restart); fader.addupdatelistener(new valueanimator.animatorupdatelistener() { @override public void onanimationupdate(valueanimator animation) { // todo auto-generated method stub invalidate(); } });
and in ondraw() method, animate bitmap as
@override protected void ondraw(canvas canvas) { // todo auto-generated method stub super.ondraw(canvas); canvas.save(); canvas.drawbitmap(bitmap1, x, y , paint1); canvas.restore(); }
what api can use make work api 8 ?
Comments
Post a Comment