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

    if ((requestCode == Const.RequestCode.VOICE_RECOGNITION)
        && (resultCode == Activity.RESULT_OK)) {
      ArrayList<String> matches = intent.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
      WebnetLog.d("size: " + matches.size());
      if (matches.size() > 0) {
        WebnetLog.d("1st: " + matches.get(0));
        EditText et = (EditText) mFragmentView.findViewById(R.id.address);
        et.setText(matches.get(0));
      }
    }
  }
    @Override
    protected void onPostExecute(Integer result) {

      if (mPredictionsArray != null) {
        mItems = mPredictionsArray;

        ListView lv = (ListView) mFragmentView.findViewById(R.id.list);
        mAdapter = new ListAdapter(mParentActivity, 0, mItems);
        lv.setAdapter(mAdapter);
      } else {
        WebnetLog.d("No result");
      }

      setPlacesTaskLock(false);
    }
Пример #3
0
 public static void i(String tag, String message) {
   Log.i(WebnetLog.TAG, WebnetLog.formatMessage(tag, message));
 }
Пример #4
0
 public static void i(String message, Throwable tr) {
   _i(WebnetLog.TAG, WebnetLog.formatMessage(message + " " + tr.getMessage()));
 }
Пример #5
0
 public static void i(String message) {
   _i(WebnetLog.TAG, WebnetLog.formatMessage(message));
 }
Пример #6
0
 public static void i() {
   _i(WebnetLog.TAG, WebnetLog.formatMessage());
 }
Пример #7
0
 protected static String formatMessage(String tag, String message) {
   return (tag + ": " + WebnetLog.getCallerTrace() + ": " + message);
 }
Пример #8
0
 protected static String formatMessage() {
   return (WebnetLog.getCallerTrace());
 }
Пример #9
0
 public static void d(String tag, String message, Throwable tr) {
   _d(WebnetLog.TAG, WebnetLog.formatMessage(tag, message + " " + tr.getMessage()));
 }