{"id":13645033,"url":"https://github.com/Jacksgong/JKeyboardPanelSwitch","last_synced_at":"2025-04-21T11:32:37.567Z","repository":{"id":34450623,"uuid":"38385659","full_name":"Jacksgong/JKeyboardPanelSwitch","owner":"Jacksgong","description":"For resolve the layout conflict when keybord \u0026 panel are switching (Android键盘面板冲突 布局闪动处理方案)","archived":false,"fork":false,"pushed_at":"2020-08-18T05:13:02.000Z","size":24090,"stargazers_count":4189,"open_issues_count":62,"forks_count":686,"subscribers_count":126,"default_branch":"master","last_synced_at":"2025-04-13T16:05:13.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jacksgong.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-01T17:42:01.000Z","updated_at":"2025-04-10T08:57:50.000Z","dependencies_parsed_at":"2022-08-24T13:00:11.586Z","dependency_job_id":null,"html_url":"https://github.com/Jacksgong/JKeyboardPanelSwitch","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacksgong%2FJKeyboardPanelSwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacksgong%2FJKeyboardPanelSwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacksgong%2FJKeyboardPanelSwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacksgong%2FJKeyboardPanelSwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jacksgong","download_url":"https://codeload.github.com/Jacksgong/JKeyboardPanelSwitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741198,"owners_count":21154253,"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":[],"created_at":"2024-08-02T01:02:23.998Z","updated_at":"2025-04-21T11:32:37.534Z","avatar_url":"https://github.com/Jacksgong.png","language":"Java","readme":"# The handler for the keyboard and panel layout conflict in Android\n\n[![Download][bintray_svg]][bintray_link]\n[![Build Status][build_status_svg]][build_status_link]\n[![](https://img.shields.io/badge/SnapShot-1.6.3-origin.svg)](https://oss.sonatype.org/content/repositories/snapshots/cn/dreamtobe/kpswitch/library/)\n\n\u003e [中文文档](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/README_zh.md)\n\n---\n\n\u003e This solution was built When I was working in WeChat, what is used for resolving the layout conflict when you switch between the keyboard and the emoji-panel/function-panel.\n\n---\n\n\u003e There is a post to declaration the core rules of this solution: [Switching between the panel and the keyboard in Wechat](http://blog.dreamtobe.cn/2015/02/07/Switching-between-the-panel-and-the-keyboard/)。\n\n![][non-fullscreen_resolved_gif]![][fullscreen_resolved_gif]\n![][adjust_resolved_gif]![][adjust_unresolved_gif]\n\n---\n\n## Welcome PR\n\n- Comments as much as possible.\n- Commit message format follow: [AngularJS's commit message convention](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#-git-commit-guidelines) .\n- The change of each commit as small as possible.\n\n---\n\n## INSTALLATION\n\nJKeyboardPanelSwitch is installed by adding the following dependency to your `build.gradle` file:\n\n```groovy\ncompile 'cn.dreamtobe.kpswitch:library:1.6.1'\n```\n\nIf you want to import snapshot version, We have already publish the snapshot version to [the sonatype](https://oss.sonatype.org/content/repositories/snapshots/cn/dreamtobe/kpswitch/) so you can import snapshot version after declare the following repository: \n```groovy\nallprojects {\n  repositories {\n      maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }\n  }\n}\n```\n\n## USAGE\n\n\u003e Recommend `clone` the `demo` project and run it, I has already cover cases as much as possible in the demo project.\n\n![](https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/demo_snapshot.png)\n\n- [The integration tutorial of The non-fullscreen theme Or The status bar is translucent with `fitsSystemWindows=true`](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/NON-FULLSCREEN_TUTORIAL.md)\n- [The integration tutorial of The fullscreen theme Or The status bar is translucent with `fitsSystemWindows=false`](https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/FULLSCREEN_TUTORIAL.md)\n\n## PRINCIPLE\n\n- The calculation about the height of keyboard and whether the keyboard is showing，Ref: [KeyboardUtil.KeyboardStatusListener#calculateKeyboardHeight][KeyboardUtil_calculateKeyboardHeight_link]、[KeyboardUtil.KeyboardStatusListener#calculateKeyboardShowing][KeyboardUtil_calculateKeyboardShowing_link]。\n- Handle the problem about the layout conflict，Ref: [KPSwitchRootLayoutHandler][KPSwitchRootLayoutHandler_link]，Besides the panel layout used in the case of the non-fullscreen theme: [KPSwitchPanelLayoutHandler][KPSwitchPanelLayoutHandler_link]；The panel layout used in case of the fullscreen theme: [KPSwitchFSPanelLayoutHandler][KPSwitchFSPanelLayoutHandler_link]。\n\n\n## License\n\n```\nCopyright 2015 Jacks gong.\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\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[bintray_link]: https://bintray.com/jacksgong/maven/JKeyboardPanelSwitch/_latestVersion\n[bintray_svg]: https://api.bintray.com/packages/jacksgong/maven/JKeyboardPanelSwitch/images/download.svg\n[fullscreen_resolved_gif]: https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/fullscreen_resolved.gif\n[non-fullscreen_resolved_gif]: https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/non-fullscreen_resolved.gif\n[adjust_resolved_gif]: https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/adjust_resolved.gif\n[adjust_unresolved_gif]: https://raw.githubusercontent.com/Jacksgong/JKeybordPanelSwitch/master/art/adjust_unresolved.gif\n[build_status_svg]: https://travis-ci.org/Jacksgong/JKeyboardPanelSwitch.svg?branch=master\n[build_status_link]: https://travis-ci.org/Jacksgong/JKeyboardPanelSwitch\n[KeyboardUtil_calculateKeyboardHeight_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L214\n[KeyboardUtil_calculateKeyboardShowing_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/util/KeyboardUtil.java#L266\n[KPSwitchRootLayoutHandler_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/handler/KPSwitchRootLayoutHandler.java\n[KPSwitchPanelLayoutHandler_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/handler/KPSwitchPanelLayoutHandler.java\n[KPSwitchFSPanelLayoutHandler_link]: https://github.com/Jacksgong/JKeyboardPanelSwitch/blob/master/library/src/main/java/cn/dreamtobe/kpswitch/handler/KPSwitchFSPanelLayoutHandler.java\n","funding_links":[],"categories":["软键盘"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacksgong%2FJKeyboardPanelSwitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJacksgong%2FJKeyboardPanelSwitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacksgong%2FJKeyboardPanelSwitch/lists"}