如何在Android的SoftKeyBoard其功能添加Go按钮? [英] how to add Go button in android SoftKeyBoard and its functionality?

查看:150
本文介绍了如何在Android的SoftKeyBoard其功能添加Go按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望把转到按钮,在Android的蒋云良softkeyboard

i want to put "Go" button in android appliation softkeyboard

有关搜索和其他相关的场景任何一个可以指导我如何实现这一目标?有例子。

for search and other related scenarios can any one guide me how to achieve this? with example.

任何帮助将appriciated。

any help would be appriciated.

推荐答案

最后,我用...

EditText SearchEditText =(EditText)findViewById(R.id.txtMapSearch); 
SearchEditText.setOnEditorActionListener(new OnEditorActionListener(){  

    @Override 
    public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) { 
        if(arg1 == EditorInfo.IME_ACTION_SEARCH)  
        { 
            // search pressed and perform your functionality.
        }
        return false; 
    } 

}); 

这篇关于如何在Android的SoftKeyBoard其功能添加Go按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆