2014-01-29 77 views
1

我在活動中的TextView有點問題。我創建活動與字母邊欄和overlayView繪製字母字符活動泄露了窗口android本來是

我想銷燬/關閉任何,我的TextView。

 
android.view.WindowLeaked: Activity com.package.activity.ActSklep has leaked window [email protected] that was originally added here 

com.package.activity.ActSklep has leaked window [email protected] that was originally added here

我的代碼:http://pastebin.com/WqhULBfA

編輯: 類側邊欄 http://pastebin.com/prRZ9nsf

回答

2

你加入你的TextView到窗口onCreate嘗試onDestroy將其取出:

((WindowManager) this.getSystemService(Context.WINDOW_SERVICE)).removeView(overlayTextView); 
+0

我不知道我如何做到這一點 – Michael

+0

是的,我找到了相同的解決方案 – Michael

相關問題