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


Java Intent.ACTION_WEB_SEARCH属性代码示例

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


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

示例1: createIntentHandlerDelegate

protected IntentHandlerDelegate createIntentHandlerDelegate() {
    return new IntentHandlerDelegate() {
        @Override
        public void processWebSearchIntent(String query) {
            Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);
            searchIntent.putExtra(SearchManager.QUERY, query);
            startActivity(searchIntent);
        }

        @Override
        public void processUrlViewIntent(String url, String referer, String headers,
                TabOpenType tabOpenType, String externalAppId, int tabIdToBringToFront,
                boolean hasUserGesture, Intent intent) {
        }
    };
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:16,代码来源:ChromeActivity.java

示例2: searchWebFor

protected void searchWebFor(String... keys) {
    StringBuilder stringBuilder = new StringBuilder();
    for (String key : keys) {
        stringBuilder.append(key);
        stringBuilder.append(" ");
    }
    Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
    intent.putExtra(SearchManager.QUERY, stringBuilder.toString());
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

    startActivity(intent);
}
 
开发者ID:aliumujib,项目名称:Orin,代码行数:12,代码来源:AbsTagEditorActivity.java

示例3: setUpRecyclerView

private void setUpRecyclerView() {

        googleTrendAdapter = new FancyTrendAdapter(this, trendItemList, Constant.DEFAULT_ROW_NUMBER, new FancyTrendAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(View v, String trend, int position) {
                if (!mVisible) {
                    FancyTrendActivity.this.toggle();
                    FancyTrendActivity.this.delayedHide(AUTO_HIDE_DELAY_MILLIS);
                } else {
                    if (fancyTrendPresenter.getClickBehavior() == SPUtils.ClickBehaviorItem.googleSearch) {
                        //TODO:Use chrome tab to implement
                        Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
                        intent.putExtra(SearchManager.QUERY, trend);
                        startActivity(intent);
                    } else if (fancyTrendPresenter.getClickBehavior() == SPUtils.ClickBehaviorItem.singlecountry) {
                        new MaterialDialog.Builder(FancyTrendActivity.this)
                                .title(R.string.choose_country)
                                .items(R.array.trend_country_name)
                                .itemsCallback((dialog, view, which, text) -> {
                                    String code = Constant.getCountryCode(String.valueOf(text));
                                    fancyTrendPresenter.retrieveSingleTrend(code, position);
                                })
                                .show();
                    }
                }
            }
        });
        trendRecycleView.setLayoutManager(new CustomGridLayoutManager(this, Constant.DEFAULT_COLUMN_NUMBER));
        trendRecycleView.setAdapter(googleTrendAdapter);
        trendRecycleView.setHasFixedSize(true);
    }
 
开发者ID:fantasy1022,项目名称:FancyTrendView,代码行数:31,代码来源:FancyTrendActivity.java

示例4: webSearch

final void webSearch(String query) {
  Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
  intent.putExtra("query", query);
  launchIntent(intent);
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:5,代码来源:ResultHandler.java

示例5: processWebSearchIntent

@Override
public void processWebSearchIntent(String query) {
    Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);
    searchIntent.putExtra(SearchManager.QUERY, query);
    startActivity(searchIntent);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:6,代码来源:ChromeLauncherActivity.java

示例6: webSearch

final void webSearch(String query) {
    Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
    intent.putExtra("query", query);
    launchIntent(intent);
}
 
开发者ID:xiong-it,项目名称:ZXingAndroidExt,代码行数:5,代码来源:ResultHandler.java

示例7: webSearch

public static void webSearch(Context c, String text) {
    Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
    intent.setData(Uri.parse(text));
    c.startActivity(intent);
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:5,代码来源:Intents.java


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