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 -~----------~----~----~----~------~----~------~--~---