java – Android: Pull data from an ArrayLIst of Objects


I have a problem getting data from an ArrayList of Objects. this is my object

public class ImageData {
    private int id;
    private String name;
    private Bitmap bitmap;
    private String path;

    public int getId() {
        return id;

    public void setId(int id) { = id;

    public String getName() {
        return name;

    public void setName(String name) { = name;

    public Bitmap getBitmap() {
        return bitmap;

    public void setBitmap(Bitmap bitmap) {
        this.bitmap = bitmap;

    public String getPath() {
        return path;

    public void setPath(String path) {
        this.path = path;

Then in another Object I have an ArrayList of this object

public class CheckIn {
    private int folio;
    private String customer;
    private String delivered;
    private ArrayList<ImageData> images;
//    private ArrayList<String> imagePath;

    private static CheckIn instanceCheckIn;

    private CheckIn(){

    public static CheckIn getInstance() {

        if (instanceCheckIn == null)
            instanceCheckIn = new CheckIn();

        return instanceCheckIn;

    public int getFolio() {
        return folio;

    public void setFolio(int folio) {
        this.folio = folio;

    public String getCustomer() {
        return customer;

    public void setCustomer(String customer) {
        this.customer = customer;

    public String getDelivered() {
        return delivered;

    public void setDelivered(String delivered) {
        this.delivered = delivered;

    public ArrayList<ImageData> getImages() {
        return images;

    public void setImages(ArrayList<ImageData> imageDatasArray) {
        this.images = imageDatasArray;

But what I want to do is only remove the Bitmaps from the ArrayList because later I am going to put them in an ImageView


In your ImageData class you already have the get and set of each of its properties. Therefore, to obtain its values, it would be enough to simply go through this list, and call its get method to manipulate it and to give them to your ImageView :

CheckIn checkin = new CheckIn();
for (ImageData object: checkin.getImages()) {
    //Aqui manipulas el valor y los vas seteando a tus imagenes
Scroll to Top