In my First activity I have list of bitmaps stored in ArrayList of type Bitmap, I need same list for my Second Activity. How can I achieve that?
Please help!
In my First activity I have list of bitmaps stored in ArrayList of type Bitmap, I need same list for my Second Activity. How can I achieve that?
Please help!
Create Pojo class with required fields which u need to pass to next Activity as follows : In Android Studio window use windows+Insert key to generate getter,setter and Parcelable methods.
public class PojoClass {
private String name;
private String id;
private String place;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPlace() {
return place;
}
public void setPlace(String place) {
this.place = place;
}
}
Set the values to pojo class:
Intent intent = new Intent(this,NextActivity.class);
intent.putExtra("Data", pojoclass);
startActivity(intent);
In Next Activity
ArrayList arrayList = getIntent().getParcelableExtra("Data");