开发者

Android Galaxy Tab Search button causes problem

I have created the android application for both android phones and galaxy tab, in default search button at the bottom of the Tab, while hitting web service when i click the search button ,the progress is stopped , my application getting collapsed ,but it is working fine whe开发者_JAVA百科n I don`t click that button.

I need to handle search button in galaxy tab.How can I handle that? . Because that button is not present in mobile phone.

If anyone know the solution help me out?

Thanks.


using the following code block i can handle that button,

@Override
public boolean onKeyDown(int keyCode, KeyEvent event)  {
    if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getRepeatCount() == 0) {
        return true; // or false (obviously?)
    }
    return super.onKeyDown(keyCode, event);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜