SimonVT / android-menudrawer

*DEPRECATED* A slide-out menu implementation, which allows users to navigate between views in your app.
http://simonvt.github.com/android-menudrawer/
Apache License 2.0
2.59k stars 1.11k forks source link

fix: You must call removeView() #252

Closed ameen-sarsour closed 10 years ago

ameen-sarsour commented 10 years ago

11-02 11:43:53.235: E/AndroidRuntime(3670): Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. 11-02 11:43:53.235: E/AndroidRuntime(3670): at android.view.ViewGroup.addViewInner(ViewGroup.java:3618) 11-02 11:43:53.235: E/AndroidRuntime(3670): at android.view.ViewGroup.addView(ViewGroup.java:3489) 11-02 11:43:53.235: E/AndroidRuntime(3670): at android.view.ViewGroup.addView(ViewGroup.java:3465) 11-02 11:43:53.235: E/AndroidRuntime(3670): at net.simonvt.menudrawer.MenuDrawer.setMenuView(MenuDrawer.java:1552) 11-02 11:43:53.235: E/AndroidRuntime(3670): at net.simonvt.menudrawer.MenuDrawer.setMenuView(MenuDrawer.java:1536)

SimonVT commented 10 years ago

You should rather fix your code so you don't add views with a parent than hide the error. You're likely doing something wrong.

ameen-sarsour commented 9 years ago

thank you