I have an ArrayList in my program and some part of the program I'm parsin an soap object and every item is one tempArraylist.After the item iteration is finished I'm adding this ArrayList into another Arraylist my problem is it's not adding the content it is adding the reference of the tempArray.How can I add the value of array not reference of it.
Here is my code.
for (int i = 0; i < count; i++)
{
tempContents.clear();
Log.i(TAG , String.valueOf(count));
Object property = response2.getProperty(i);
if (property instanceof SoapObject)
{
SoapObject category_list = (SoapObject) property;
for(int j = 0 ; j<tags.size() ; j++)
{
if(category_list.getProperty(tags.get(j)).toString().contains("Resim"))
{
String tempResim = "htttp://www.balikesir.bel.tr/";
tempResim += category_list.getProperty(tags.get(j)).toString();
tempContents.add(tempResim);
}
else
{
if(category_list.getProperty(tags.get(j)).toString().equals("anyType{}"))
{continue;}
tempContents.add(category_list.getProperty(tags.get(j)).toString());
}
}
for(int k = 0 ;k < tempContents.size() ; k++ )
Log.i("For ici 5 minare",tempContents.get(k));
Log.i("For disi 4 minare","Asdas asdas");
contents.add(tempContents);
}
}