コード例 #1
0
  @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));
      }
    }
  }
コード例 #2
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()));
 }