Reputation: 790
I have little problem with my TextView in activity. I create activity with alphabet Sidebar and overlayView for drawing alphabet character
I would like destroy/close whatever, my TextView.
android.view.WindowLeaked: Activity com.package.activity.ActSklep has leaked window android.widget.TextView@406afc78 that was originally added here com.package.activity.ActSklep has leaked window android.widget.TextView@4063f550 that was originally added here
My code: http://pastebin.com/WqhULBfA
Edit: Class sidebar http://pastebin.com/prRZ9nsf
Upvotes: 1
Views: 899
Reputation: 17401
You are adding your textView to window in onCreate
try removing it in onDestroy
:
((WindowManager) this.getSystemService(Context.WINDOW_SERVICE)).removeView(overlayTextView);
Upvotes: 2