如何在Android的SoftKeyBoard其功能添加Go按钮?按钮、功能、如何在、SoftKeyBoard

2023-09-05 04:57:28 作者:兔裹煎蛋卷

我希望把转到按钮,在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; 
    } 

});