我试图跳过我ArrayList
的Intent
。但是我找不到要写的额外内容?任何获取方法我都会收到诸如“不适用于字符串”之类的错误。
项目详情:
public class ItemDetails {
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getItemDescription() {
return itemDescription;
}
public void setItemDescription(String itemDescription) {
this.itemDescription = itemDescription;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public int getImageNumber() {
return imageNumber;
}
public void setImageNumber(int imageNumber) {
this.imageNumber = imageNumber;
}
public int getVideoNumber() {
return videoNumber;
}
public void setVideoNumber(int videoNumber) {
this.videoNumber = videoNumber;
}
public void setChild(ArrayList<ItemDetails> item_child)
{
this.item_child = item_child;
}
public ArrayList<ItemDetails> getChild()
{
return this.item_child;
}
public void setParent(ArrayList<ItemDetails> item_parent)
{
this.item_parent = item_parent;
}
public ArrayList<ItemDetails> getParent()
{
return this.item_parent;
}
private String name ;
private String itemDescription;
private String price;
private int imageNumber;
private int videoNumber;
private ArrayList<ItemDetails> item_child;
private ArrayList<ItemDetails> item_parent;
}
我的课:
static class ViewHolder {
TextView txt_itemName;
TextView txt_itemDescription;
TextView txt_itemPrice;
ImageView itemImage;
ArrayList<ItemDetails> item_parent;
ArrayList<ItemDetails> item_child;
}
我的putExtra:
intObj.putExtra("exerciselist",obj_itemDetails.getChild());
GetChild 函数:
public ArrayList<ItemDetails> getChild()
{
return this.item_child;
}
但我找不到我应该如何写来获取arrayList?
ArrayList<ItemDetails> child1 = getIntent().?????????