ListView with TextFilter

by » Fri, 06 Mar 2009 22:00:30 GMT

Sponsored Links
 Hi all,

I have a ListView with the text filter enabled plus an
OnItemClickListener. I don't understand how to find out which item
from my initial list was clicked because in void onItemClick
(AdapterView <?> parent, View v, int position, long id) position gives
the current position of the clicked item (after filtering) which is
NOT the initial position of this item in the list.

Any way to do it? I would be disapointed if we should do the filtering
ourselves in the same time in the corresponding ListAdapter...


ListView with TextFilter

by Romain Guy » Sat, 07 Mar 2009 00:44:33 GMT

 Filtering happens in the adapter at the same time. All you have to do
is use the position parameter to ask the adapter for the item at that

On Fri, Mar 6, 2009 at 6:00 AM,

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


Sponsored Links

ListView with TextFilter

by » Sat, 07 Mar 2009 00:54:32 GMT

 It works! Great! Thanks Romain :-)

Other Threads

1. Finding Location Latitude and Longitude using GPS in HTC MAGIC device..

You have not requested location updates, so getLastKnownLocation() will
always return null.

Also, getLastKnownLocation() will almost never have a value immediately,
as it takes GPS some time to obtain a fix.

Mark Murphy (a Commons Guy) |

Android Consulting/App Development:

2. Finding Location Latitude and Longitude using GPS in HTC MAGIC device..

Hi all,
I have the problem like this.
Basically i want to find my present location's latitude and
longitude .It is showing in emulator which is default one which points
to Sanjose,usa.But it is not finding my current location(i am in
Hyderabad,India).When i try to run the same application in My HTC
magic (Android os 1.5) it is showing NULL.It is Not finding my present
What i have to there need of Network provider like Mobile
network(Vodafone,airtel etc..)
I am sending my code,Please check it and send me the working code if
any body have,Please i need it urgently.
Please Help me regarding this.
the code is as follows:
class WhereAmI extends Activity {

  public void onCreate(Bundle icicle) {

    LocationManager locationManager;
    locationManager = (LocationManager)getSystemService
    Location location = locationManager.getLastKnownLocation


  /** Update UI with a new location */
  private void updateWithNewLocation(Location location) {
          TextView myLocationText = (TextView)findViewById

          String latLongString;

    if (location != null) {
            double lat = location.getLatitude();
            double lng = location.getLongitude();
            latLongString = "Lat:" + lat + "\nLong:" + lng;
          } else {
            latLongString = "No location found";

          myLocationText.setText("Your Current Position is:\n" +

Manifest file is as follows:

<manifest xmlns:android=""
  <application android:icon="@drawable/icon">
    <activity android:name=".GPS" android:label="@string/app_name">
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />


Please help me very urgently.......

3. Finding direction using compass

4. 2010 : Android Army is coming..choose ur soldier!!

5. App crashes on Droid, works fine on G1

6. Flowing View Group

7. applying style to textview