Michael
Michael

Reputation: 790

Activity has leaked window android that was originally

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

Answers (1)

vipul mittal
vipul mittal

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

Related Questions