wcf is my .net webservice sorry for not mentionning it.Anyway, i try to
connect 2 spinners when i click on an item of the first one i the other one
should be refreshed. i can't do that and here is the code if u want


adapter2=*new ArrayAdapter(this,android.R.layout.simple_spinner_item
,ServiceName)*;

adapter2.setDropDownViewResource(android.R.layout.*
simple_spinner_dropdown_item*);

services.setAdapter(adapter2);

services.setOnItemSelectedListener(*new*AdapterView.OnItemSelectedListener() {

@Override

*public* *void* onNothingSelected(AdapterView<?> parentView) {

}

@Override

*public* *void* onItemSelected(AdapterView<?> arg0, View arg1,*int* arg2, *
long* arg3) {

listEmployees=GetEmployees(service.getSelectedItem().toString());

List<String> EmployeesName=*new ArrayList()*;

*if*(listEmployees!=*null*){

*for*(*int* i=0;i<listEmployees.size();i++)
EmployeesName.add(listEmployees.get(i).getName());


adapter3=*new ArrayAdapter(ActivityName.this,android.R.layout.
simple_spinner_item,EmployeesName)*;

//adapter3 = ArrayAdapter.createFromResource(CheckPlanningAdmin.this,
R.array.Months, android.R.layout.simple_spinner_item);

adapter3.setDropDownViewResource(android.R.layout.*
simple_spinner_dropdown_item*);

employees.setAdapter(adapter3);

}}

});
Here's the code thx for any help i just want to remember u that i can get
data from my webservice but once inside the bloc of the listener "
listEmployees" is empty.

Thx for ur help!!!!

2010/5/18 TreKing <[email protected]>

>  On Tue, May 18, 2010 at 10:11 AM, Lamia Hannoun 
> <[email protected]>wrote:
>
>> I tried to do this by creating  a listener OnItemSelectedListener() but
>> it doesn't work.
>>
>> Any Ideas???
>>
>
> Here's an idea - try posting more information than "it doesn't work".
>
> On Tue, May 18, 2010 at 10:16 AM, Lamia Hannoun <[email protected]> 
> wrote:
>
>
>  Actually i can change the content with a simple array but the problem is
>> that i'm calling inside the listener a method from my wcf i debug the
>> problem and i could see that i can perfectly get data from my wcf.It's
>> wiered i can't define the cause!!
>>
>
> What is WCF?
>
>
> -------------------------------------------------------------------------------------------------
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> 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