package com.atmob.keyboard_android.util

import android.annotation.SuppressLint
import android.view.View

@SuppressLint("StaticFieldLeak")
object KeyboardHolder {
    private var keyboardRootView: View? = null

    /**
     * 保存软键盘的根View
     */
    fun attachKeyboardRootView(view: View) {
        this.keyboardRootView = view
    }

    /**
     * 获取软键盘的根View
     */
    fun getKeyboardRootView(): View? {
        return this.keyboardRootView
    }

    /**
     * 移除软键盘的根View
     */
    fun detachKeyboardRootView() {
        this.keyboardRootView = null
    }
}