zzz40500 / AndroidSweetSheet

一个富有动感的Sheet(选择器)
Apache License 2.0
2.06k stars 365 forks source link

连续show两次,报错 #20

Open myface-wang opened 7 years ago

myface-wang commented 7 years ago

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. at android.view.ViewGroup.addViewInner(ViewGroup.java:4310) at android.view.ViewGroup.addView(ViewGroup.java:4146) at android.view.ViewGroup.addView(ViewGroup.java:4118) at com.mingle.sweetpick.CustomDelegate.show(CustomDelegate.java:124) at com.mingle.sweetpick.SweetSheet.show(SweetSheet.java:115) at com.acgcode.template.MainActivity$1.onClick(MainActivity.java:81) at android.view.View.performClick(View.java:5207) at android.view.View$PerformClick.run(View.java:21177) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5458) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

应该是控件内部没有执行完,需要考虑执行完才能进行下一次show

myface-wang commented 7 years ago

需要增加对执行完成的监听(show完成,dismiss完成)