コード例 #1
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (requestCode == SpeechHelper.REQUEST_CODE_TTS) {
     speechHelper.onActivityResult(requestCode, resultCode, data);
     return;
   }
   super.onActivityResult(requestCode, resultCode, data);
 }
コード例 #2
0
 @Override
 public void onJavaScriptInterfaceGetSelection(String callback, String selection) {
   Log.d(TAG, String.format("onJavaScriptInterfaceGetSelection: %s %s", callback, selection));
   if (callback.equals(JAVASCRIPT_CALLBACK_SEARCH)) {
     search(selection);
   }
   if (callback.equals(JAVASCRIPT_CALLBACK_SPEECH)) {
     speechHelper.speech(selection);
   }
 }
コード例 #3
0
  @Override
  protected void onDestroy() {
    speechHelper.finish();
    webView.setWebViewClient(null);
    webView.removeJavascriptInterface(BrowserActivityJavaScriptInterface.NAME);
    webView.stopLoading();
    webView.destroy();
    translatePanelFragment.setListener(null);

    super.onDestroy();
  }
コード例 #4
0
 @Override
 public void onClickTranslatePanelSpeechButton(DicItemListView.Data data) {
   speechHelper.speech(data.Index.toString());
 }