thank you i am trying to get row number using this code.

On Thu, Jan 6, 2011 at 4:44 AM, Kapil Lokhande <[email protected]>wrote:

> here is the snippet
>
> import android.app.ListActivity;
> import android.os.Bundle;
> import android.widget.ArrayAdapter;
>
> public class SimpleListView extends ListActivity
> {
>     /** Called when the activity is first created. */
>
>       @Override
>       public void onCreate(Bundle savedInstanceState)
>         {
>               super.onCreate(savedInstanceState);
>               setListAdapter(new ArrayAdapter(this,
>                       android.R.layout.simple_list_item_1, WORLDCUP2010));
>
>               getListView().setTextFilterEnabled(true);
>       }
>       
>       static final String[] WORLDCUP2010 = new String[] {
>               "Algeria",  "Argentina", "Australia",
>               "Brazil", "Cote d'Ivoire", "Cameroon",
>
>               "Chile", "Costa Rica", "Denmark",
>               "England", "France", "Germany",
>               "Ghana",  "Greece", "Honduras",
>               "Italy",  "Japan", "Netherlands",
>
>               "New Zealand", "Nigeria", "North Korea",
>               "Paraguay", "Portugal","Serbia",
>               "Slovakia", "Slovenia", "South Africa",
>
>               "South Korea",  "Spain", "Switzerland",
>               "United States", "Uruguay" };
> }
> public void onListItemClick(ListView parent, View v,
>                       int position,long id) {
>
>               selection.setText(WORLDCUP2010[position]);
>       }
>       
> }
>
> --
> Thanks & Regards,
> Kapil Lokhande | Dexter Advisory Pvt. Ltd. <http://dexterltd.com/> |
> Android Developer
> [image: dexterlogo.jpg]
>
>
> On Thu, Jan 6, 2011 at 6:05 PM, Amit Mangal 
> <[email protected]>wrote:
>
>> which function i need to call ?
>> do you have some code snippet i am new to android and don know any thing.
>>
>> thank you
>>
>>
>> On Thu, Jan 6, 2011 at 5:58 PM, Kapil Lokhande <[email protected]>wrote:
>>
>>> Hi Amit,
>>>
>>> you have to override onListItemClick event in your activity extending
>>> listactivity.
>>> in that event you wull get position or row number of list item.
>>> --
>>> Thanks & Regards,
>>> Kapil Lokhande | Dexter Advisory Pvt. Ltd. <http://dexterltd.com/> |
>>> Android Developer
>>> [image: dexterlogo.jpg]
>>>
>>>
>>> On Thu, Jan 6, 2011 at 5:04 PM, Amit Mangal <[email protected]
>>> > wrote:
>>>
>>>> Hi Any one,
>>>> Is there any way to get row number in list view in which i clicked ?
>>>> suppose that if i clicked on row 5 how can i get which number of roe i
>>>> clicked ?
>>>>
>>>> thank you
>>>>
>>>>  --
>>>> 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]<android-developers%[email protected]>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>>
>>>  --
>>> 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]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>  --
>> 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]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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