本帖最后由 qeemiaomiao 于 2012-10-17 12:02:00 编辑

解决方案 »

  1.   

    setAlpha(float alpha);
    Sets the opacity of the view. This is a value from 0 to 1, where 0 means the view is completely transparent and 1 means the view is completely opaque.
    大概的意思是:0是完全透明的,1是完全不透明
    根据自己想要的效果写成算法,将变量放进setAlpha()方法里,变量取0-1之前的float,这样就可以达到渐变的效果。如下:
    setAlpha(0);
    setAlpha(0.1);
    setAlpha(0.2);
    ...
    setAlpha(1);
    这只是个例子,你也可以是0.01或者更小。
      

  2.   

    你的意思是自己PS出一个PNG的背景图来吗?那个有点麻烦,有没有直接用代码的?
      

  3.   

    可以TransitionDrawable用这个类来实现
    final TransitionDrawable td =
                        new TransitionDrawable(new Drawable[] {
                                new ColorDrawable(android.R.color.transparent),
                                new BitmapDrawable(mResources, bitmap)
                        });
    imageView.setImageDrawable(td);
    td.startTransition(400);
      

  4.   

    new BitmapDrawable(mResources, bitmap)这个方法该怎么用啊?传什么参数进去?