{"id":18536334,"url":"https://github.com/bakerjq/android-backgrounddarkpopupwindow","last_synced_at":"2025-09-11T17:40:41.365Z","repository":{"id":28612090,"uuid":"32130606","full_name":"BakerJQ/Android-BackgroundDarkPopupWindow","owner":"BakerJQ","description":"Android PopupWindow with dark background","archived":false,"fork":false,"pushed_at":"2017-04-19T16:41:39.000Z","size":3587,"stargazers_count":92,"open_issues_count":1,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T08:55:46.715Z","etag":null,"topics":["android-popup","android-popupwindow","background-dark"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BakerJQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-13T05:16:14.000Z","updated_at":"2024-06-05T04:58:48.000Z","dependencies_parsed_at":"2022-09-03T16:02:53.417Z","dependency_job_id":null,"html_url":"https://github.com/BakerJQ/Android-BackgroundDarkPopupWindow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BakerJQ%2FAndroid-BackgroundDarkPopupWindow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BakerJQ%2FAndroid-BackgroundDarkPopupWindow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BakerJQ%2FAndroid-BackgroundDarkPopupWindow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BakerJQ%2FAndroid-BackgroundDarkPopupWindow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BakerJQ","download_url":"https://codeload.github.com/BakerJQ/Android-BackgroundDarkPopupWindow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248068096,"owners_count":21042419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-popup","android-popupwindow","background-dark"],"created_at":"2024-11-06T19:32:24.928Z","updated_at":"2025-04-09T16:33:54.431Z","avatar_url":"https://github.com/BakerJQ.png","language":"Java","readme":"# Android-BackgroundDarkPopupWindow\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\nAndroid PopupWindow with dark background\n\n## Screenshot\n![](https://github.com/BakerJQ/Android-BackgroundDarkPopupWindow/raw/master/Screenshots/show.gif)\n\n## Gradle via JCenter\n``` groovy\ncompile 'com.bakerj:backgrounddark-popupwindow:1.0.0'\n```\n\n## How to use\n### Init\nJust use it as the same as the original PopupWindow\n```java\nmPopupWindow = new BackgroundDarkPopupWindow(mTextView, WindowManager.LayoutParams.WRAP_CONTENT,\n                WindowManager.LayoutParams.WRAP_CONTENT);\nmPopupWindow.setFocusable(true);\nmPopupWindow.setBackgroundDrawable(new BitmapDrawable());\nmPopupWindow.setAnimationStyle(android.R.style.Animation_Dialog);\n```\n#### Set dark layer\n```java\ncase R.id.top:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark on bottom\");\n    mPopupWindow.setDarkStyle(-1);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0000000\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.darkBelow(mBtnTop);\n    mPopupWindow.showAsDropDown(mBtnTop, mBtnTop.getRight() / 2, 0);\n    break;\ncase R.id.left:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark on right\");\n    mPopupWindow.setDarkStyle(-1);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0000000\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.darkRightOf(mBtnLeft);\n    mPopupWindow.showAtLocation(mBtnLeft, Gravity.CENTER_VERTICAL | Gravity.LEFT, 0, 0);\n    break;\ncase R.id.right:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark on left\");\n    mPopupWindow.setDarkStyle(-1);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0000088\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.drakLeftOf(mBtnRight);\n    mPopupWindow.showAtLocation(mBtnRight, Gravity.CENTER_VERTICAL | Gravity.RIGHT, 0, 0);\n    break;\ncase R.id.bottom:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark on top\");\n    mPopupWindow.setDarkStyle(-1);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0008800\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.darkAbove(mBtnBottom);\n    mPopupWindow.showAtLocation(mBtnBottom, Gravity.CENTER_HORIZONTAL, 0, mBtnBottom.getTop());\n    break;\ncase R.id.center:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark in center\");\n    mPopupWindow.setDarkStyle(R.style.MyDarkStyle);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0880000\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.drakLeftOf(mBtnRight);\n    mPopupWindow.darkRightOf(mBtnLeft);\n    mPopupWindow.darkAbove(mBtnBottom);\n    mPopupWindow.darkBelow(mBtnTop);\n    mPopupWindow.showAtLocation(mBtnCenter, Gravity.CENTER, 0, 0);\n    break;\ncase R.id.all:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark fill all\");\n    mPopupWindow.setDarkStyle(-1);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0000000\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.darkFillScreen();\n    mPopupWindow.showAtLocation(mBtnAll, Gravity.CENTER, 0, 0);\n    break;\ncase R.id.view:\n    mTextView.setText(\"This is a popupwindow\\n\\ndark fill view\");\n    mPopupWindow.setDarkStyle(-1);\n    mPopupWindow.setDarkColor(Color.parseColor(\"#a0000000\"));\n    mPopupWindow.resetDarkPosition();\n    mPopupWindow.drakFillView(mBtnView);\n    mPopupWindow.showAtLocation(mBtnView, Gravity.CENTER, 0, 0);\n    break;\n```\n### *License*\n\nBackgroundDarkPopuoWindow is released under the [Apache 2.0 license](license.txt).\n\n```\nCopyright 2017 BakerJ.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at following link.\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakerjq%2Fandroid-backgrounddarkpopupwindow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbakerjq%2Fandroid-backgrounddarkpopupwindow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbakerjq%2Fandroid-backgrounddarkpopupwindow/lists"}