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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -