首页 新闻 搜索 专区 学院

ViewPager中GridView 其中一页删除一项,滑动ViewPager就崩溃

0
悬赏园豆:5 [已关闭问题] 关闭于 2014-10-13 18:42

ViewPager中GridView 其中一页删除一项,滑动ViewPager就崩溃,求帮助

下面是错误日志:

08-11 16:12:29.663: E/AndroidRuntime(5234): java.util.ConcurrentModificationException
08-11 16:12:29.663: E/AndroidRuntime(5234): at java.util.AbstractList$SubAbstractList.size(AbstractList.java:360)
08-11 16:12:29.663: E/AndroidRuntime(5234): at com.example.launcherdemo.AppsAdapter.getCount(AppsAdapter.java:86)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.GridView.onMeasure(GridView.java:1037)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1381)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4918)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1411)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1059)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.LinearLayout.onMeasure(LinearLayout.java:590)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.SlidingDrawer.onMeasure(SlidingDrawer.java:275)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:645)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:425)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4918)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4918)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1411)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.LinearLayout.measureVertical(LinearLayout.java:698)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4918)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
08-11 16:12:29.663: E/AndroidRuntime(5234): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2198)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.View.measure(View.java:15604)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2165)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1249)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1443)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1139)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4879)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:776)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.Choreographer.doCallbacks(Choreographer.java:579)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.Choreographer.doFrame(Choreographer.java:548)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:762)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.os.Handler.handleCallback(Handler.java:725)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.os.Handler.dispatchMessage(Handler.java:92)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.os.Looper.loop(Looper.java:153)
08-11 16:12:29.663: E/AndroidRuntime(5234): at android.app.ActivityThread.main(ActivityThread.java:5523)
08-11 16:12:29.663: E/AndroidRuntime(5234): at java.lang.reflect.Method.invokeNative(Native Method)
08-11 16:12:29.663: E/AndroidRuntime(5234): at java.lang.reflect.Method.invoke(Method.java:511)
08-11 16:12:29.663: E/AndroidRuntime(5234): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:835)
08-11 16:12:29.663: E/AndroidRuntime(5234): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
08-11 16:12:29.663: E/AndroidRuntime(5234): at dalvik.system.NativeStart.main(Native Method)

owner_hzh的主页 owner_hzh | 初学一级 | 园豆:6
提问于:2014-08-11 16:48
< >
分享
所有回答(1)
0

你好,我想问一下,你这个问题解决了吗?因为我也遇到类似的问题了,但是我在长按OnItemLongClickListener时,无法实现删除功能。。。。。想和你交流一下

mlheaven | 园豆:202 (菜鸟二级) | 2018-04-27 21:31
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册