任意方向滑动的scrollview 解决快速滑动内容消失的bug

时间:2017-10-10 02:36:05
【文件属性】:
文件名称:任意方向滑动的scrollview 解决快速滑动内容消失的bug
文件大小:58KB
文件格式:JAVA
更新时间:2017-10-10 02:36:05
scrollview 任意方向 android 控件 解决:http://download.csdn.net/download/cboy017/4901452 资源中控件的bug 快速滑动内容消失的问题。 修改点: // 开启动画移动 public void animation() { // 开启移动动画 TranslateAnimation ta = new TranslateAnimation(0, -inner.getLeft(), 0, -inner.getTop()); ta.setDuration(200); inner.startAnimation(ta); // 设置回到正常的布局位置 new Handler().postDelayed(new Runnable() { public void run() { /* * modify by taocungui for content disappear bug * @2014.9.17 */ if (normal.left == 0 && normal.top == 0 && normal.right == 0 && normal.bottom == 0) { Log.e(TAG, "TCG: returned from exception"); return; } //taocungui modify end @2014.9.17 inner.clearAnimation(); inner.layout(normal.left, normal.top, normal.right, normal.bottom); normal.setEmpty(); } }, 200); }

网友评论