Hi, where i placed wrog code please corect it ,otherwise please send one example of listview and onlistitemclicklistener please ..
Thanks Bhas ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- On Mon, Aug 3, 2009 at 1:11 AM, peter <[email protected]> wrote: > > I think you have a wrong place in you code > > As first parameter in method "onListItemClick" is not "AdapterView " > type but "ListView" > > On Aug 2, 2:54 am, bhas <[email protected]> wrote: > > Hi all, > > I am beginer to the anroid ,i am using the below code for displaying > > listview and i am not able to getting the onlistitemclick events for > > further ui's. pleas help me. > > > > package com.List; > > > > import android.app.Activity; > > import android.app.AlertDialog; > > import android.app.ListActivity; > > import android.content.ContentUris; > > import android.content.DialogInterface; > > import android.content.Intent; > > import android.content.DialogInterface.OnClickListener; > > import android.database.Cursor; > > import android.database.DataSetObserver; > > import android.os.Bundle; > > import android.provider.Contacts.People; > > import android.widget.AdapterView; > > import android.widget.ArrayAdapter; > > import android.widget.ListAdapter; > > import android.widget.ListView; > > import android.widget.TextView; > > import android.widget.AdapterView.OnItemClickListener; > > import android.widget.SimpleAdapter.ViewBinder; > > import android.view.View; > > import android.view.ViewGroup; > > > > public class HelloListView extends ListActivity { > > private static final String[] Cities = null; > > > > ListActivity getListView = null; > > /** Called when the activity is first created. */ > > @Override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > final String[] Cities = new String[] > > {"Hyderabad","Bangalore","Chennai","Delhi","Kolkata" > > > > }; > > setListAdapter((ListAdapter) new > ArrayAdapter<String>(this, > > android.R.layout.simple_list_item_1, Cities)); > > getListView().setTextFilterEnabled(true); > > > > } > > > > public void onListItemClick(AdapterView parent, View v, int > > position, long id) { > > > > } > > } > > > > Regards > > Bhas > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

