Getting the values from an array in android

Posted by Rahul Varma on Stack Overflow See other posts from Stack Overflow or by Rahul Varma
Published on 2010-04-16T07:10:40Z Indexed on 2010/04/16 7:13 UTC
Read the original article Hit count: 314

Filed under:

Hi,

I have a collection of strings and declared the strings individually as arrays using

ArrayList<String> al=new ArrayList<String>();

and called the arrays in the program by using

al=getIntent().getStringArrayListExtra("titles");

Now, instead of declaring each of the arrays i have created SongsArray.java like below...

public class SongsArray {
private String title;
private String movieName;
private String singerName;
private String imagePath;
private String mediaPath;

public String gettitle() 
{
    return title;
}
public void settitle(String title) {
    this.title = title;
}
public String getmovieName() {
    return movieName;
}
public void setmovieName(String movieName) {
    this.movieName = movieName;
}
public String getsingerName() {
    return singerName;
}
public void setsingerName(String singerName) {
    this.singerName = singerName;
}
public String getimagePath() {
    return imagePath;
}
public void setimagePath(String imagePath) {
    this.imagePath = imagePath;
}
public String getmediaPath() {
    return mediaPath;
}
public void setmediaPath(String mediaPath) {
    this.mediaPath = mediaPath;
}

}

Now i want to call the arrays that i have declared. How can i do that???

© Stack Overflow or respective owner

Related posts about android