android pass bundle with search

后端 未结 5 1836
南笙
南笙 2020-12-06 13:02

Hello i am using android 3.0 search widget(not the search mode), the problem is i need to pass some parameters along with the search word.

Android i

5条回答
  •  Happy的楠姐
    2020-12-06 13:30

    If your calls is syncronic(you perform one search request and waiting for response and don't perform any search request until you got your response) then it's easy.

    Just create a helper static class to do it for you.

    Some thing like this:

    public static Bundle myStaticClass;
    .
    .
    .
    myStaticClass.putString(key, value);
    callSearch();
    .
    .
    .
    afterSearchResponse();
    String value = myStaticClass.get(key);
    

提交回复
热议问题