I have to develop an one android application.
Here i have to get the list of items and set that list of item value in android spinner.
So i have using following code:
if (getIntent().getExtras() !=null) {
retailerNamesList = (ArrayList<RetailerNames>) getIntent().getExtras().getSerializable("RetailerName");
for (int i=0;i<retailerNamesList.size();i++) {}
mRetailerNameAdapter = new RetailerNamesAdapter(WatchList.this,retailerNamesList);
retailerlist.setAdapter(mRetailerNameAdapter);
}
Here i get the list of arraylist values in that spinner.but i have to split these values and set it in android spinner.please help me.how can i do ???
EDIT:
In the above code am getting the output like:
[com.example.RetailerNames@41216470]
But i need to get the output like:
String[] period_timings={"0-2 days","Within a Week","Within a Month"};
That list have to split and get the values in string[].How can i write the code for these ??? please provide me solution for these ???
retailerNamesList.get(i).