views:

38

answers:

2

I'm applying an AlphaAnimation to a Button. The animation is extremely simple.

<alpha xmlns:android="http://schemas.android.com/apk/res/android"
       android:interpolator="@android:anim/accelerate_decelerate_interpolator"
       android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="500"/>

On the emulator, the button fades out nicely with no discernable artifacts. On actual devices (Nexus One & Motorola Droid), there is a noticeable black artifact from the actual frame of the button.

Is there any way to avoid this? It looks like crap.

Emulator:

Emulator

Device:

alt text

(Images have been doctored because it's hard to capture the same fade state during an animation, but that's exactly what it looks like)

A: 

Hello,

same problem here.

  • I ecounter this problem on Samsung Galaxy S.
  • on HTC Legend it does not occure

The transculent-black area scales up during animation. It scaes up to the size of the view. I noticed the strength of the black area differes, when I change the background color to white for example. But actually this does not solve the problem.

A: 

I'm assuming the answer is that Android does a crap job of cross-fading. Marking this as the answer for lack of a better explanation.

DougW