@Mark, Sorry if I took you by surprise :) I see your name in a lot of
discussions around here and have been reading your Book (Beginning
Android), so thought you would know. Thanks anyways

Thanks Lance, I thought I knew how to do that but just didn't have
direction... slowly getting there

On Sep 10, 6:30 am, Lance Nanek <lna...@gmail.com> wrote:
> On Sep 8, 10:15 am, Abhi <abhishek.r.sha...@gmail.com> wrote:
>
> > I want to know if I can extract the text result on the list view and
> > use it as a String further on? The part of code I am refering to is
> > below where mList is defined as ListView:
>
> > ArrayList<String> matches = data.getStringArrayListExtra
> > (RecognizerIntent.EXTRA_RESULTS);
> > mList.setAdapter(new ArrayAdapter<String>(this,
> > android.R.layout.simple_list_item_1, matches));
>
> The results are in the matches variable as strings already.
> If you want the first one do something like this:
> String firstResult = null != matches && !matches.isEmpty() ?
> matches.get(0) : null;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to