0
我使用ListView教程中的脚本,并试图获得一些随机填充的内容,主要目的是学习Android SDK。我无法通过一件事得到...从包含类对象的静态最终对象[]中获取字符串值
片的脚本:
private static class Video { public String title;
public String description;
public int image;
.
.
.
public Video(String title, String description, int image) {
this.title = title;
this.description = description;
this.image = image;
}
}
private static final Object[] OBJECTS = {
"Movies",
new Video("Iron Man 2", "description", R.drawable.ferrari),
new Video("Twilight - Chapitre 3 : hasitation"),
"Series",
.
.
.
};
我知道如果我使用的对象[0]的ToString()我得到“电影”。但是,我是如何从当前位置的'new Video()'条目获得第一个值(标题)的。
我现在明白了,它就像一个魅力!感谢您的建议,我也会深入研究吸气和安装人员。 –