{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/vlayout/issues/112","repository_url":"https://api.github.com/repos/alibaba/vlayout","labels_url":"https://api.github.com/repos/alibaba/vlayout/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/vlayout/issues/112/comments","events_url":"https://api.github.com/repos/alibaba/vlayout/issues/112/events","html_url":"https://github.com/alibaba/vlayout/issues/112","id":238072563,"number":112,"title":"添加2个LinearLayoutHelper，2个LinearLayoutHelper中各有一个Viewpager 出现重叠 并且滑动的时候 挂了,异常信息在内容中。","user":{"login":"awpss","id":6221157,"avatar_url":"https://avatars1.githubusercontent.com/u/6221157?v=3","gravatar_id":"","url":"https://api.github.com/users/awpss","html_url":"https://github.com/awpss","followers_url":"https://api.github.com/users/awpss/followers","following_url":"https://api.github.com/users/awpss/following{/other_user}","gists_url":"https://api.github.com/users/awpss/gists{/gist_id}","starred_url":"https://api.github.com/users/awpss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awpss/subscriptions","organizations_url":"https://api.github.com/users/awpss/orgs","repos_url":"https://api.github.com/users/awpss/repos","events_url":"https://api.github.com/users/awpss/events{/privacy}","received_events_url":"https://api.github.com/users/awpss/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-23T08:18:11Z","updated_at":"2017-06-23T08:22:21Z","closed_at":"2017-06-23T08:22:21Z","body":"   recyclerView = (RecyclerView) findViewById(R.id.main_view);\r\n        VirtualLayoutManager layoutManager = new VirtualLayoutManager(this);\r\n\r\n        recyclerView.setLayoutManager(layoutManager);\r\n\r\n        final RecyclerView.RecycledViewPool viewPool = new RecyclerView.RecycledViewPool();\r\n        recyclerView.setRecycledViewPool(viewPool);\r\n\r\n        viewPool.setMaxRecycledViews(0, 20);\r\n        DelegateAdapter delegateAdapter = new DelegateAdapter(layoutManager, true);\r\n        recyclerView.setAdapter(delegateAdapter);\r\n\r\n\r\n        List<DelegateAdapter.Adapter> adapters = new LinkedList<>();\r\n\r\n        /**\r\n         *顶部轮播图\r\n         */\r\n        LinearLayoutHelper layoutHelperADViewPager = new LinearLayoutHelper();\r\n        layoutHelperADViewPager.setAspectRatio(4.0f);\r\n        adapters.add(new SubAdapter(this, layoutHelperADViewPager, 1, initTopADView()));\r\n\r\n\r\n        /**\r\n         * 推荐轮播图\r\n         */\r\n        LinearLayoutHelper layoutHelperRecommendViewPager = new LinearLayoutHelper();\r\n        layoutHelperRecommendViewPager.setMargin(0, 30, 0, 0);\r\n        layoutHelperRecommendViewPager.setAspectRatio(2.0f);\r\n        adapters.add(new RecommendAdapter(this, layoutHelperRecommendViewPager, 1, initTopADView()));\r\n\r\n\r\n异常信息:\r\nava.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.\r\n                                                                                           at android.view.ViewGroup.addViewInner(ViewGroup.java:4471)\r\n                                                                                           at android.view.ViewGroup.addView(ViewGroup.java:4312)\r\n                                                                                           at android.support.v4.view.ViewPager.addView(ViewPager.java:1505)\r\n                                                                                           at android.view.ViewGroup.addView(ViewGroup.java:4252)\r\n                                                                                           at android.view.ViewGroup.addView(ViewGroup.java:4225)\r\n                                                                                           at com.ejp.test.Adapter.ADPagerAdapter.instantiateItem(ADPagerAdapter.java:48)\r\n                                                                                           at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1034)\r\n                                                                                           at android.support.v4.view.ViewPager.populate(ViewPager.java:1248)\r\n                                                                                           at android.support.v4.view.ViewPager.populate(ViewPager.java:1116)\r\n                                                                                           at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:2150)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2212)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)\r\n                                                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2301)\r\n                                                                                           at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:447)\r\n                                                                                           at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871)\r\n                                                                                           at android.app.Activity.dispatchTouchEvent(Activity.java:3213)\r\n                                                                                           at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:409)\r\n                                                                                           at android.view.View.dispatchPointerEvent(View.java:10228)\r\n                                                                                           at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4845)\r\n                                                                                           at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4705)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4238)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4291)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4257)\r\n                                                                                           at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4384)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4265)\r\n                                                                                           at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4441)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4238)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4291)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4257)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4265)\r\n                                                                                           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4238)\r\n                                                                                           at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6665)\r\n                                                                                           at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6639)\r\n                                                                                           at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6600)\r\n                                                                                           at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6792)\r\n                                                                                           at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)\r\n                                                                                           at android.os.MessageQueue.nativePollOnce(Native Method)\r\n                                                                                           at android.os.MessageQueue.next(MessageQueue.java:330)\r\n                                                                                           at android.os.Looper.loop(Looper.java:138)\r\n                                                                                           at android.app.ActivityThread.main(ActivityThread.java:6524)\r\n                                                                                           at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)\r\n                                                                                       \tat com.android.internal.os.ZygoteIn\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"awpss"}}