A DSL to handle soft keyboard visibility change event written in Kotlin.

Overview

Kotlin Build Status Dependencies GitHub Issues Contributions welcome License

About

A DSL to handle soft keyboard visibility change event written in Kotlin.

How to use?

Step 1. Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
	implementation 'com.github.viniciusmo:keyboard-visibility-event-android:1.0.4'
}

Step 3. Code example

keyboard {
    onClosed { alert("onClosed").show() }
    onOpened { alert("onOpened").show() }
}

Demo

Special thanks

@yshrsmz
@amadeu01

You might also like...
Kotlin matrix class which supports determinant, inverse matrix, matmul, etc.

Kotrix is a set of classes that helps people dealing with linear algebra in Kotlin.

Fuzzy string matching for Kotlin (JVM, native, JS, Web Assembly) - port of Fuzzy Wuzzy Python lib

FuzzyWuzzy-Kotlin Fuzzy string matching for Kotlin (JVM, iOS) - fork of the Java fork of of Fuzzy Wuzzy Python lib. For use in on JVM, Android, or Kot

🐫🐍🍢🅿 Multiplatform Kotlin library to convert strings between various case formats including Camel Case, Snake Case, Pascal Case and Kebab Case

KaseChange Multiplatform Kotlin library to convert strings between various case formats Supported Case Formats SCREAMING_SNAKE_CASE snake_case PascalC

Multiplaform kotlin library for calculating text differences. Based on java-diff-utils, supports JVM, JS and native targets.

kotlin-multiplatform-diff This is a port of java-diff-utils to kotlin with multiplatform support. All credit for the implementation goes to original a

Multi-module, Kotlin, MVI, Compose, Hilt, Navigation Component, Use-cases, Room, Retrofit

Work in progress Multi-module demo app that gets data from dota2 api. API https://docs.opendota.com/ Players by rank (GET) https://api.opendota.com/ap

recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.
recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.

recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.

Markdown renderer for Kotlin Compose Multiplatform (Android, Desktop)

Markdown renderer for Kotlin Compose Multiplatform (Android, Desktop)

Dagger Hilt, MVP Moxy, Retrofit, Kotlin coroutine, Sealed class

Dagger Hilt, MVP Moxy, Retrofit, Kotlin coroutine, Sealed class

Item Helper For Kotlin

Item Helper For Kotlin

Comments
  • IllegalArgumentException w/ WrapperActivityLifecycleCallback

    IllegalArgumentException w/ WrapperActivityLifecycleCallback

    Hey there.

    I am an engineer who works on Stripe's android sdk. We had a user using your library get an exception. You seem to have a missed nullability flag on one of your activities here.

    Here's our issue if you're interested. Let me know if and how I can help.

    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3623)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3775)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2261)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8107)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
    Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter bundle
    at com.viniciusmo.keyboardvisibility.WrapperActivityLifecycleCallback.onActivityCreated(Unknown Source:7)
    at android.app.Application.dispatchActivityCreated(Application.java:392)
    at android.app.Activity.dispatchActivityCreated(Activity.java:1228)
    at android.app.Activity.onCreate(Activity.java:1505)
    at androidx.core.app.ComponentActivity.onCreate(ComponentActivity.java:85)
    at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:314)
    at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:273)
    at com.stripe.android.view.StripeActivity.onCreate(StripeActivity.kt:48)
    at com.stripe.android.view.AddPaymentMethodActivity.onCreate(AddPaymentMethodActivity.kt:91)
    at android.app.Activity.performCreate(Activity.java:7957)
    at android.app.Activity.performCreate(Activity.java:7946)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3598)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3775) 
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2261) 
    at android.os.Handler.dispatchMessage(Handler.java:107) 
    at android.os.Looper.loop(Looper.java:237) 
    at android.app.ActivityThread.main(ActivityThread.java:8107) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) ```
    opened by skyler-stripe 0
  • KotlinNullPointerException

    KotlinNullPointerException

    If I call that in my Fragment I got kotlin.KotlinNullPointerException at com.viniciusmo.keyboardvisibility.FragmentGetRootViewStrategy.getRootView(FragmentGetRootViewStrategy.kt:10)

    keyboard {
        onClosed { alert("onClosed").show() }
        onOpened { alert("onOpened").show() }
    }
    
    opened by emretekin 0
Owner
Vinícius Oliveira
Vinícius Oliveira
Simple Mobile Tools 172 Dec 26, 2022
Native solution for common React Native problem of focused views being covered by soft input view.

react-native-avoid-softinput Native solution for common React Native problem of focused views being covered by soft input view. It is solved by listen

Mateusz Mędrek 312 Jan 2, 2023
Modern Kotlin version of com.example.semitop7.FireTVStyle keyboard

ftv-style-keyboard Modern Kotlin version of com.example.semitop7.FireTVStyle keyboard Manual activation on FireTV via adb shell: adb shell ime enable

nikk 1 Oct 4, 2022
Monitor keyboard height tools

Monitor keyboard height tools

Season 29 Nov 19, 2022
A utils to change statusbar for Android.

StatusBar 一个Android状态栏工具类,可以设置状态栏颜色、文字深浅、是否隐藏状态栏。 效果预览 注意 最低支持版本为Android5.0(minSdkVersion 21) 本项目仅提供AndroidX版本 在setContentView()之后调用 特点 支持状态栏颜色修改 支持状态

CSDN Mobile 6 May 5, 2022
Android library which makes it easy to handle the different obstacles while calling an API (Web Service) in Android App.

API Calling Flow API Calling Flow is a Android library which can help you to simplify handling different conditions while calling an API (Web Service)

Rohit Surwase 19 Nov 9, 2021
Screen Capture Utils - A plugin to handle screen capture events on android and ios

Screen Capture Utils A plugin to handle screen capture events on android and ios ?? Initialize SDK late ScreenCaptureUtils screenCaptureUtils;

Chiziaruhoma Ogbonda 41 Apr 12, 2022
PubSub - 使用 Kotlin Coroutines 实现的 Local Pub/Sub、Event Bus、Message Bus

PubSub 使用 Kotlin Coroutines 实现的 Local Pub/Sub、Event Bus、Message Bus 下载 将它添加到项目的

Tony Shen 4 May 30, 2022
Remove the dependency of compiled kotlin on kotlin-stdlib

Dekotlinify This project aims to take compiled Kotlin Java bytecode (compiled by the standard Kotlin compiler) and remove all references to the Kotlin

Joseph Burton 10 Nov 29, 2022
gRPC and protocol buffers for Android, Kotlin, and Java.

Wire “A man got to have a code!” - Omar Little See the project website for documentation and APIs. As our teams and programs grow, the variety and vol

Square 3.9k Dec 31, 2022