SkillAgentSearch skills...

Keyboard

Custom Keyboard Like Google Keyboard

Install / Use

/learn @amirisback/Keyboard
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Banner Jitpack Io Android CI Scan with Detekt Google Badge Android Arsenal

  • Simple research keyboard for Android
  • Custom Keyboard
  • Emoji Custom Keyboard
  • Call API inside Keyboard
  • Open Form inside Keyboard
  • Support Dark Theme
  • AutoText Feature
  • Setup Toggle Feature
<a href="https://play.google.com/store/apps/details?id=com.frogobox.frogokeyboard"> <img width="200px" height="75px" src="https://amirisback.github.io/amirisback/docs/image/google-play-badge.png"> </a>

Version Release

This Is Latest Release

$version_release = 1.2.2

What's New??

* Avaiable in dark mode *
* Enhance Performance *
* Easy Change Background Keyboard *
* Setup Theme *

How To Use As Library (Coming Soon)

Step 1. Add the JitPack repository to your build file (build.gradle : Project)

<Option 1> Groovy Gradle

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

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

<Option 2> Kotlin DSL Gradle

// Add it in your root build.gradle.kts at the end of repositories:

allprojects {
    repositories {
        ...
        maven("https://jitpack.io")
    }
}

Step 2. Add the dependency (build.gradle : Module)

<Option 1> Groovy Gradle

dependencies {
    // library frogo-keyboard
    implementation 'com.github.amirisback:keyboard:1.2.2'
}

<Option 2> Kotlin DSL Gradle

dependencies {
    // library frogo-keyboard
    implementation("com.github.amirisback:keyboard:1.2.2")
}

Step 3. Create Layout Keyboard IME

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/keyboard_holder"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/keyboard_bg_root">

    <!--  start of base keyboard-->
    <LinearLayout
        android:id="@+id/container_keyboard_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/keyboard_header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/keyboard_bg_root"
            android:minHeight="@dimen/frogo_dimen_64dp" />

        <com.frogobox.libkeyboard.ui.main.MainKeyboard
            android:id="@+id/keyboard_main"
            style="@style/KwKeyboardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/theme_dark_background_color" />

    </LinearLayout>
    <!--   End of base keyboard-->

    <!--  below is the layout for your header menu on top of your base keyboard -->
    <com.frogobox.appkeyboard.ui.keyboard.autotext.AutoTextKeyboard
        android:id="@+id/keyboard_autotext"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />

    <com.frogobox.appkeyboard.ui.keyboard.templatetext.TemplateTextKeyboard
        android:id="@+id/keyboard_template_text"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />

    <com.frogobox.appkeyboard.ui.keyboard.news.NewsKeyboard
        android:id="@+id/keyboard_news"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />

    <com.frogobox.appkeyboard.ui.keyboard.movie.MovieKeyboard
        android:id="@+id/keyboard_moview"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />

    <com.frogobox.appkeyboard.ui.keyboard.webview.WebiewKeyboard
        android:id="@+id/keyboard_webview"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />

    <com.frogobox.appkeyboard.ui.keyboard.form.FormKeyboard
        android:id="@+id/keyboard_form"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />
    <!--  end of header menu layout -->

    <com.frogobox.libkeyboard.ui.emoji.EmojiKeyboard
        android:id="@+id/keyboard_emoji"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@id/container_keyboard_main"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/container_keyboard_main" />

</androidx.constraintlayout.widget.ConstraintLayout>

Step 4. Create Service Keyboard IME

Create Class Keyboard IME

class KeyboardIME : BaseKeyboardIME<YourIMELayoutBinding>() {
  
  // set your custom keyboard layout
  override fun setupViewBinding(): YourIMELayoutBinding {
    return YourIMELayoutBinding.inflate(LayoutInflater.from(this), null, false)
  }

  override fun initialSetupKeyboard() {
    binding?.keyboardMain?.setKeyboard(keyboard!!) // your base keyboard
    binding?.mockMeasureHeightKeyboardMain?.setKeyboard(keyboard!!) // this code is for your keyboard header menu 
  }

  override fun setupBinding() {
    initialSetupKeyboard()
    binding?.keyboardMain?.mOnKeyboardActionListener = this
    binding?.keyboardEmoji?.mOnKeyboardActionListener = this
  }

  // redraw keyboard for capslock on/off state
  override fun invalidateAllKeys() {
    binding?.keyboardMain?.invalidateAllKeys()
  }

  // call this function when navigating to your feature
  override fun hideMainKeyboard() {
    binding?.apply {
      keyboardMain.gone()
      keyboardHeader.gone()
      mockMeasureHeightKeyboard.invisible()
    }
  }

  override fun showOnlyKeyboard() {
    binding?.keyboardMain?.visible()
  }

  override fun hideOnlyKeyboard() {
    binding?.keyboardMain?.visible()
  }

  // setup emoji keyboard 
  override fun runEmojiBoard() {
    binding?.keyboardEmoji?.visible()
    hideMainKeyboard()
    binding?.keyboardEmoji?.openEmojiPalette()
  }
}

For Emoji Keyboard, dont forget to implement Dependency Injection to load emoji asset manager

@HiltAndroidApp
class App: Application() {
  override fun onCreate() {
    super.onCreate()
    setupEmojiCompat()
  }

  private fun setupEmojiCompat() {
    val config = BundledEmojiCompatConfig(this)
    EmojiCompat.init(config)
  }
}

Step 5. Add keyboard header menu

setup keyboard header icon & menu name

class KeyboardUtil {

    private val pref: PreferenceDelegatesImpl by inject(PreferenceDelegatesImpl::class.java)

    fun menuToggle(): List<KeyboardFeature> {
        return listOf(
            KeyboardFeature(
                KeyboardFeatureType.AUTO_TEXT.id,
                KeyboardFeatureType.AUTO_TEXT,
                R.drawable.ic_menu_auto_text,
                pref.getPrefBoolean
View on GitHub
GitHub Stars132
CategoryDevelopment
Updated11d ago
Forks37

Languages

Kotlin

Security Score

100/100

Audited on Mar 23, 2026

No findings