开发者

Android Galaxy Tab Search button causes problem

开发者 https://www.devze.com 2023-03-11 07:18 出处:网络
I have created the android application for both android phones and galaxy tab, in defaultsearch button at the bottomof the Tab, while hitting web servicewhen i click the search button ,the progress is

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

精彩评论

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