{"id":13645684,"url":"https://github.com/ghnor/StatusBarFits","last_synced_at":"2025-04-21T17:31:22.581Z","repository":{"id":201502129,"uuid":"78023207","full_name":"ghnor/StatusBarFits","owner":"ghnor","description":"适配4.4以上版本的状态栏（颜色，内容布局延伸到状态栏）","archived":false,"fork":false,"pushed_at":"2017-03-02T02:04:11.000Z","size":70573,"stargazers_count":15,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T19:39:17.411Z","etag":null,"topics":["statusbar"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghnor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-04T14:35:05.000Z","updated_at":"2020-05-26T19:01:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"33873834-3eb5-4367-b0e6-4fb6a253240b","html_url":"https://github.com/ghnor/StatusBarFits","commit_stats":null,"previous_names":["ghnor/statusbarfits"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghnor%2FStatusBarFits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghnor%2FStatusBarFits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghnor%2FStatusBarFits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghnor%2FStatusBarFits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghnor","download_url":"https://codeload.github.com/ghnor/StatusBarFits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250100373,"owners_count":21374928,"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":["statusbar"],"created_at":"2024-08-02T01:02:39.655Z","updated_at":"2025-04-21T17:31:22.576Z","avatar_url":"https://github.com/ghnor.png","language":"Java","readme":"# StatusBarFits\n适配4.4以上版本的状态栏（颜色，内容布局延伸到状态栏）\n\n## Gradle\n```\ncompile 'com.ghnor:statusbarfits:1.1.0'\n```\n\n## Maven\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.ghnor\u003c/groupId\u003e\n  \u003cartifactId\u003estatusbarfits\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.0\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n## 用法\n在`setContentView()`方法之后调用：\n```java\nsetContentView(R.layout.main_activity);\n...\nStatusBarFits.setColor(activity);\n```\n如果布局是`DrawerLayout`，需要设置`android:fitsSystemWindows=\"true\"`。\n\n## 示例\n\n### 设置状态栏颜色\n\n```\nStatusBarFits.setColor();\n```\n\n||设置状态栏颜色|\n|-----|--------------------------------------|\n|DrawerLayout - close|\u003cimg src=\"https://github.com/ghnor/StatusBarFits/blob/master/imgs/color_drawer_close.png\"/\u003e|\n|DrawerLayout - open|\u003cimg src=\"https://github.com/ghnor/StatusBarFits/blob/master/imgs/color_drawer_open.png\"/\u003e|\n|Other|\u003cimg src=\"https://github.com/ghnor/StatusBarFits/blob/master/imgs/color_ordinary.png\"/\u003e|\n\n### 设置状态栏半透明或透明\n\n```\nStatusBarFits.setTranslucent();\n```\n```\nStatusBarFits.setTransparent();\n```\n\n||设置状态栏半透明|\n|-----|--------------------------------------|\n|DrawerLayout - close|\u003cimg src=\"https://github.com/ghnor/StatusBarFits/blob/master/imgs/translucent_drawer_close.png\"/\u003e|\n|DrawerLayout - open|\u003cimg src=\"https://github.com/ghnor/StatusBarFits/blob/master/imgs/translucent_drawer_open.png\"/\u003e|\n|Other|\u003cimg src=\"https://github.com/ghnor/StatusBarFits/blob/master/imgs/translucent_ordinary.png\"/\u003e|\n\n## Thanks\n[laobie/StatusBarUtil](https://github.com/laobie/StatusBarUtil)","funding_links":[],"categories":["其他"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghnor%2FStatusBarFits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghnor%2FStatusBarFits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghnor%2FStatusBarFits/lists"}