怎么让gridview每个ITEM实现动画效果 不知楼主这个问题解决了没有?如果解决的方便把代码发给我一份吗?邮箱[email protected] 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 没做过,猜一下:响应每个item的Click事件时,得到要动画的按钮,对它做一个动画集,包括一个alpha动画和一个scale动画。动画要求FillAfter=true,这样动画结束后可以保持状态。正规点可以自定义一个Button,把操作封装一下。 对按钮的监听好像需要啊adapter里面加载布局的时候实现,然后像楼上说的对它做一个动画集,点击按钮的时候就可以实现监听。 给你看下这几句的参考,我做的效果是 从无到有 你改下动画就行了mGridView.setLayoutAnimation(getAnimationController());protected LayoutAnimationController getAnimationController(){ LayoutAnimationController controller; Animation anim = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);//从0.5倍放大到1倍 anim.setDuration(500); controller=new LayoutAnimationController(anim,0.1f); controller.setOrder(LayoutAnimationController.ORDER_NORMAL); return controller; } Webview加载页面后,input输入框等元素点击弹出后再点页面会闪动 Gallery组件的传统用法,显示的图片超过三个就会报错,求教 android平板电脑驱动问题 Android主题 安卓app想向php段提交表单,POST方式可以吗? 写cocos2d-x老是遇到这个警告 请教各位前辈!反编译apk出来的xml代码,如何去掉倒计时3秒?有代码 有关android开发文本对话框的问题 Android无法使用jsoup android 无法连接php验证用户名和密码 请问自己的app播放音乐的时候,怎么关掉其他应用的音乐 webview网页中软键盘回车键“Go”和“Next”布局的设置
响应每个item的Click事件时,得到要动画的按钮,对它做一个动画集,包括一个alpha动画和一个scale动画。动画要求FillAfter=true,这样动画结束后可以保持状态。正规点可以自定义一个Button,把操作封装一下。
mGridView.setLayoutAnimation(getAnimationController());protected LayoutAnimationController getAnimationController(){
LayoutAnimationController controller;
Animation anim = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);//从0.5倍放大到1倍
anim.setDuration(500);
controller=new LayoutAnimationController(anim,0.1f);
controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
return controller;
}