Android - TextView Selectable LIstener

針對TextView 選擇、複製,做監聽動作

forgetPasswordLabel.customSelectionActionModeCallback = object : ActionMode.Callback {
    override fun onCreateActionMode(mode: ActionMode?, menu: Menu?): Boolean {
        KLog.d("shawnTest","onCreateActionMode")
        return true
    }

    override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean {
        KLog.d("shawnTest","onPrepareActionMode")
        return true
    }

    override fun onActionItemClicked(mode: ActionMode?, item: MenuItem?): Boolean {
        KLog.d("shawnTest","onActionItemClicked")
        return false
    }

    override fun onDestroyActionMode(mode: ActionMode?) {
        KLog.d("shawnTest","onDestroyActionMode")
    }

}

shawn