{"id":13428197,"url":"https://github.com/yshrsmz/KeyboardVisibilityEvent","last_synced_at":"2025-03-16T01:32:03.480Z","repository":{"id":28847083,"uuid":"32370961","full_name":"yshrsmz/KeyboardVisibilityEvent","owner":"yshrsmz","description":"Android Library to handle software keyboard visibility change event.","archived":false,"fork":false,"pushed_at":"2021-09-29T09:59:20.000Z","size":418,"stargazers_count":1741,"open_issues_count":8,"forks_count":170,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-03-09T20:51:58.662Z","etag":null,"topics":["android","android-library"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/yshrsmz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"yshrsmz","patreon":null,"open_collective":null,"ko_fi":"yshrsmz","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-03-17T04:10:02.000Z","updated_at":"2025-02-28T10:05:04.000Z","dependencies_parsed_at":"2022-07-27T17:03:53.025Z","dependency_job_id":null,"html_url":"https://github.com/yshrsmz/KeyboardVisibilityEvent","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2FKeyboardVisibilityEvent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2FKeyboardVisibilityEvent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2FKeyboardVisibilityEvent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yshrsmz%2FKeyboardVisibilityEvent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yshrsmz","download_url":"https://codeload.github.com/yshrsmz/KeyboardVisibilityEvent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814900,"owners_count":20352037,"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","android-library"],"created_at":"2024-07-31T01:00:49.033Z","updated_at":"2025-03-16T01:32:03.137Z","avatar_url":"https://github.com/yshrsmz.png","language":"Kotlin","funding_links":["https://github.com/sponsors/yshrsmz","https://ko-fi.com/yshrsmz"],"categories":["Kotlin","Libraries","Java"],"sub_categories":[],"readme":"KeyboardVisibilityEvent\n===\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-KeyboardVisibilityEvent-green.svg?style=flat)](https://android-arsenal.com/details/1/2519)\n[![Android Gems](http://www.android-gems.com/badge/yshrsmz/KeyboardVisibilityEvent.svg?branch=master)](http://www.android-gems.com/lib/yshrsmz/KeyboardVisibilityEvent)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.yslibrary.keyboardvisibilityevent/keyboardvisibilityevent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.yslibrary.keyboardvisibilityevent/keyboardvisibilityevent)\n\nAndroid Library to handle soft keyboard visibility change event.\nshow/hide keyboard method is also included.\n\n## Library's status\n\nCurrently I don't have enough time to maintain this library, so I leave this as it is.  \nI'm going to merge PRs when they arrive though ;)\n\n## Features\n- handle keyboard visibility change\n- check if keyboard is currently visible\n- show/hide keyboard(check UIUtil.java)\n\n_Please note that as described in this [issue](https://github.com/yshrsmz/KeyboardVisibilityEvent/issues/1), currently the library cannot detect visibility change when the activity's `windowSoftInputMode` do not change Activity's height(such as `adjustNothing`)._\n\n## Installation\n\nAAR is distributed via Maven Central. The latest version is [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.yslibrary.keyboardvisibilityevent/keyboardvisibilityevent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.yslibrary.keyboardvisibilityevent/keyboardvisibilityevent)\n\n```groovy\ndependencies {\n    compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:LATEST_VERSION'\n}\n```\n\n## Usage\n\ncheck out sample project!\n\n### Add event listener for keyboard change event\n\n#### Automatically unregistering the event on the Activity's onDestroy\n```java\nKeyboardVisibilityEvent.setEventListener(\n        getActivity(),\n        new KeyboardVisibilityEventListener() {\n            @Override\n            public void onVisibilityChanged(boolean isOpen) {\n                // some code depending on keyboard visiblity status\n            }\n        });\n```\n\n#### Automatically unregistering the event on the LifecycleOwner's `ON_DESTROY`\n\nThis is convenient when you want to KeyboardVisibilityEvent from a Fragment.\n\n```java\nKeyboardVisibilityEvent.setEventListener(\n        getActivity(),\n        getLifecycleOwner(),\n        new KeyboardVisibilityEventListener() {\n            @Override\n            public void onVisibilityChanged(boolean isOpen) {\n                // some code depending on keyboard visiblity status\n            }\n        });\n```\n\n#### Manually unregistering the event\n```java\n// get Unregistrar\nUnregistrar unregistrar = KeyboardVisibilityEvent.registerEventListener(\n        getActivity(),\n        new KeyboardVisibilityEventListener() {\n            @Override\n            public void onVisibilityChanged(boolean isOpen) {\n                // some code depending on keyboard visiblity status\n            }\n        });\n\n// call this method when you don't need the event listener anymore\nunregistrar.unregister();\n```\n\n## License\n\n    Copyright 2015-2021 Shimizu Yasuhiro (yshrsmz)\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyshrsmz%2FKeyboardVisibilityEvent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyshrsmz%2FKeyboardVisibilityEvent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyshrsmz%2FKeyboardVisibilityEvent/lists"}