当前位置: 首页>>代码示例>>Java>>正文


Java MaterialSearchView.REQUEST_VOICE属性代码示例

本文整理汇总了Java中com.miguelcatalan.materialsearchview.MaterialSearchView.REQUEST_VOICE属性的典型用法代码示例。如果您正苦于以下问题:Java MaterialSearchView.REQUEST_VOICE属性的具体用法?Java MaterialSearchView.REQUEST_VOICE怎么用?Java MaterialSearchView.REQUEST_VOICE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.miguelcatalan.materialsearchview.MaterialSearchView的用法示例。


在下文中一共展示了MaterialSearchView.REQUEST_VOICE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onActivityResult

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
    if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == Activity.RESULT_OK)
    {
        ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
        if (matches != null && matches.size() > 0)
        {
            String searchWrd = matches.get(0);
            if (!TextUtils.isEmpty(searchWrd))
            {
                mSearchView.setQuery(searchWrd, false);
            }
        }
        return;
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
开发者ID:WeDevelopTeam,项目名称:HeroVideo-master,代码行数:18,代码来源:HomePageFragment.java

示例2: onActivityResult

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {

  if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == Activity.RESULT_OK) {
    ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
    if (matches != null && matches.size() > 0) {
      String searchWrd = matches.get(0);
      if (!TextUtils.isEmpty(searchWrd)) {
        mSearchView.setQuery(searchWrd, false);
      }
    }

    return;
  }
  super.onActivityResult(requestCode, resultCode, data);
}
 
开发者ID:MUFCRyan,项目名称:BilibiliClient,代码行数:16,代码来源:HomePageFragment.java

示例3: onActivityResult

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
    //GESTION DE LA RECHERCHE VIA LA VOIX
    if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == RESULT_OK) {
        ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
        if (matches != null && matches.size() > 0) {
            String searchWrd = matches.get(0);
            if (!TextUtils.isEmpty(searchWrd)) {
                searchView.setQuery(searchWrd, false);
            }
        }

        return;
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
开发者ID:SoxZz5,项目名称:FitFood,代码行数:17,代码来源:MainActivity.java

示例4: onActivityResult

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == RESULT_OK){
        ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
        if (matches != null && matches.size() > 0){
            String searchWord = matches.get(0);
            if (!TextUtils.isEmpty(searchWord)){
                mSearchView.setQuery(searchWord, false);
            }
        }
        return;
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
开发者ID:MUFCRyan,项目名称:BilibiliClient,代码行数:14,代码来源:HomePageFragment.java

示例5: onActivityResult

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == RESULT_OK) {
        ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
        if (matches != null && matches.size() > 0) {
            String searchWrd = matches.get(0);
            if (!TextUtils.isEmpty(searchWrd)) {
                materialSearchView.setQuery(searchWrd, false);
            }
        }

        return;
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
开发者ID:salRoid,项目名称:Filmy,代码行数:15,代码来源:MainActivity.java

示例6: onActivityResult

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == MaterialSearchView.REQUEST_VOICE && resultCode == RESULT_OK) {
        ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
        if (matches != null && matches.size() > 0) {
            String searchWrd = matches.get(0);
            if (!TextUtils.isEmpty(searchWrd)) {
                searchView.setQuery(searchWrd, false);
            }
        }
        return;
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
开发者ID:paladin952,项目名称:Movie-Time-Spent,代码行数:14,代码来源:SearchActivity.java


注:本文中的com.miguelcatalan.materialsearchview.MaterialSearchView.REQUEST_VOICE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。