@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); }
public static void i(String tag, String message) { Log.i(WebnetLog.TAG, WebnetLog.formatMessage(tag, message)); }
public static void i(String message, Throwable tr) { _i(WebnetLog.TAG, WebnetLog.formatMessage(message + " " + tr.getMessage())); }
public static void i(String message) { _i(WebnetLog.TAG, WebnetLog.formatMessage(message)); }
public static void i() { _i(WebnetLog.TAG, WebnetLog.formatMessage()); }
protected static String formatMessage(String tag, String message) { return (tag + ": " + WebnetLog.getCallerTrace() + ": " + message); }
protected static String formatMessage() { return (WebnetLog.getCallerTrace()); }
public static void d(String tag, String message, Throwable tr) { _d(WebnetLog.TAG, WebnetLog.formatMessage(tag, message + " " + tr.getMessage())); }