0

I have class :

public class ClassList 
{   
    private String Language1;
    private String Language2;
    public ClassList(String Language1,String Language2)
    {
        this.Language1 = Language1;
        this.Language2 = Language2;
    }
    public String Language1() 
    {
        return this.Language1;
    }
    public String Language2()
    {
        return this.Language2;
    }

}

I would like to send ArrayList to another activity by using an instance of this class. Is this possible?

WilliamKF
  • 41,123
  • 68
  • 193
  • 295
  • Your `ClassList` have to implement either `Parcelable` or `Serializable` interface. Have look at [this answer](http://stackoverflow.com/questions/15731029/array-list-intent-extra-in-java/15731120#15731120). – Simon Dorociak Apr 05 '13 at 20:30

1 Answers1

0

I would like to send ArrayList to another activity by instance using. It is possible?

Assuming you mean, sending the ClassList to another Activity by using an Intent, you have to look at the Parcelable interface:

Here's a nice example of how to do it

Entreco
  • 12,738
  • 8
  • 75
  • 95