{"action":"opened","issue":{"url":"https://api.github.com/repos/futuresimple/android-floating-action-button/issues/256","labels_url":"https://api.github.com/repos/futuresimple/android-floating-action-button/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/futuresimple/android-floating-action-button/issues/256/comments","events_url":"https://api.github.com/repos/futuresimple/android-floating-action-button/issues/256/events","html_url":"https://github.com/futuresimple/android-floating-action-button/issues/256","id":105023915,"number":256,"title":"can I use floating action button overlay of all programs??","user":{"login":"AhmadVatani","id":13574768,"avatar_url":"https://avatars.githubusercontent.com/u/13574768?v=3","gravatar_id":"","url":"https://api.github.com/users/AhmadVatani","html_url":"https://github.com/AhmadVatani","followers_url":"https://api.github.com/users/AhmadVatani/followers","following_url":"https://api.github.com/users/AhmadVatani/following{/other_user}","gists_url":"https://api.github.com/users/AhmadVatani/gists{/gist_id}","starred_url":"https://api.github.com/users/AhmadVatani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AhmadVatani/subscriptions","organizations_url":"https://api.github.com/users/AhmadVatani/orgs","repos_url":"https://api.github.com/users/AhmadVatani/repos","events_url":"https://api.github.com/users/AhmadVatani/events{/privacy}","received_events_url":"https://api.github.com/users/AhmadVatani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-05T12:24:04Z","updated_at":"2015-09-05T12:24:04Z","closed_at":null,"body":"Hi, i want to use floating action button overlay of all applications, i tried this code:\r\nWindowManager.LayoutParams params = new WindowManager.LayoutParams(\r\n                WindowManager.LayoutParams.WRAP_CONTENT,\r\n                WindowManager.LayoutParams.WRAP_CONTENT,\r\n                WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,\r\n                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE\r\n                        | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL\r\n                        | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,\r\n                PixelFormat.TRANSLUCENT);\r\n\r\n        params.gravity = Gravity.TOP | Gravity.LEFT;\r\n        params.x = 20;\r\n        params.y = 20;\r\n\r\n        WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);\r\n        LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\r\n        ViewGroup mPopupLayout = (RelativeLayout) inflater.inflate(R.layout.activity_main, null);\r\n        FloatingActionsMenu myView = (FloatingActionsMenu) mPopupLayout.findViewById(R.id.iv1);\r\n\r\n        wm.addView(mPopupLayout, params);\r\n\r\nbut got this exception:\r\n\r\nandroid.view.WindowLeaked: Activity com.example.elahe.floatingtest.MainActivity has leaked window android.widget.RelativeLayout{75916e9 V.E..... ........ 0,0-960,1322} that was originally added here\r\n\r\n\r\nhow can solve it??"}}