-2

I tried with intent of intent.putExtra("listname", list) and shared preferance list.But it doesnot give the actual result. Help me out of this

Intent intent=new Intent(HotelSearch.this, HotelSearchResults.class); intent.putExtra("listname", list);

secondactivity:

hotelsearchresult=(ArrayList)intent.getSerializableExtra("listname");

  • You need to be much more specific. What is happening, what did you expect to happen, is any error found in logcat, and post the exact code being used. – Gabe Sechan Jul 22 '14 at 07:53

1 Answers1

0

You must use serializable model

intent.putExtra("MyClass", obj);  
getSerializableExtra("MyClass");

Your model will be like this;

public class City implements Serializable {

public String Name;
public String Name_EN;
public int ID;
}

for more answer follow this link : https://stackoverflow.com/a/2736612/3098590

Community
  • 1
  • 1
ihsanbal
  • 229
  • 3
  • 9