Just called ListView.setOnItemClickListener(). Also, you can have as
many different widgets as you want in a ListActivity.

On Tue, Nov 4, 2008 at 7:26 PM, Anshul <[EMAIL PROTECTED]> wrote:
>
> I have created a ListView and want to register a listener whenever an
> item on the listview is clicked. I saw a lot of references on
> implementing the onListItemClick function but it requires that my
> class be derived from ListActivity. My activity has few buttons, some
> edittestboxes and a listview so I don't want to derive my class from
> ListActivity.
>
> Is there any way I can add an item click listener to the list view. I
> create a list view using the following code.
>
>      listViewXMLFiles = (ListView)
> findViewById(R.id.ListViewXMLFiles);
>      ListAdapter listAdapter = new ArrayAdapter<String>(this,
> android.R.layout.simple_list_item_1, mStrings);
>      listViewXMLFiles.setAdapter(listAdapter);
>
>     // TODO: Add a item select listener,
>
>
> Thanks,
> -Anshul
> >
>



-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to