@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()));
 }