Android的view视图清除效果,Android:在使用Window.addContentView时清除隐藏视图?

我最近得到了一些淡入淡出的东西,所以我的“加载”视图是一个ImageView,它占据了整个屏幕,然后在主视图(在这种情况下是一个GridView)淡入其顶部。在活动中创造的,我称之为:Android:在使用Window.addContentView时清除隐藏视图?

setContentView(R.layout.loading_foo);

那么当装载的AsyncTask完成后,我拨打以下:

LayoutInflater inflater = LayoutInflater.from(getApplicationContext());

GridView gridview = (GridView) inflater.inflate(R.layout.foo, null);

//fade in the view as it's shown

gridview.setAnimation(AnimationUtils.loadAnimation(this, R.anim.fade_in));

//populate the items adapter

gridview.setAdapter(new FooGridAdapter(apps));

//now overlay the gridview on top of the loading_springboard page

ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);

getWindow().addContentView(gridview, layoutParams);

我需要做什么特别清理loading_foo视图减少我的应用程序使用的内存量?这种方法的其他问题?

(很长一段时间的读者,首次海报)

2009-11-19

Eric

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值