用AnimationListener,默认为inVisiable或者gone ,在onAnimationStart方法中显示出来,试试???
解决方案 »
- 自动更新:已安装了存在签名冲突的同名数据包。怎么办?
- 长按菜单怎么获取ListView里的Item?
- 有谁做过GPS模拟定位功能啊?急!!!!!!!!
- Androidmanifest.xml 中遇到的问题
- 请问像system.img userdata.img boot.img和其他模块或者镜像如何单独编译呢
- 使用Eclipse写Android程序的时候,Eclipse老是莫名其妙的死掉
- 求助,在view中,可否动态改变此view包含view的位置
- android客户端如何获取Tomcat服务器的列表?急急急!!!
- jni层调用socket(AF_INET, SOCK_DGRAM, 0)失败
- 请问如何实现这样的功能?
- 如何关闭Android Studio对于错误拼写的英文单词的提示
- 滑动加速度问题
public class MainActivity extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.activity_main);
View view = LayoutInflater.from(this).inflate(R.layout.test, null);
Animation animation = new AlphaAnimation(0.3f, 1.0f);
animation.setDuration(3000);
animation.setFillAfter(true);
view.startAnimation(animation);
this.setContentView(view);
}}刚写的,这个是启动就startAnimation();当然也可以做成触发的。呵呵,这个比较简单了,如果你用的是ValueAnimator或者是ObjectAnimator的话那个就更好控制了。