我必须将一项活动传递给另一项活动:我有SalesProduct enetity类别: public class Product implements Parcelable{ private double availableQuantity; private double price; private String productCode; private String description; private String description2; private String productGroup; private String alternateSearch; private String productTypeCode; private String nonStockItemFlag; private String salableFlag; private double weight; private double qty; private double grossValue; private double value; private ArrayList<Product> product; public Product() { } public Product(Parcel in) { this(); readFromParcel(in); } /* * Constructor calls read to create object */ private void readFromParcel(Parcel in) { in.readTypedList(product, Product.CREATOR); /* NULLPOINTER HERE */ } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { dest.writeList(product); } public static final Parcelable.Creator<Product> CREATOR = new Parcelable.Creator<Product>() { public Product createFromParcel(Parcel in) { Product prod = new Product(); Bundle b = in.readBundle(Product.class.getClassLoader()); prod.product = b.getParcelableArrayList("enteredProduct"); return prod; } public Product[] newArray(int size) { return new Product[size]; } }; /** * @param product */ public Product(ArrayList<Product> product) { this.product = product; } /** * @param availableQuantity * @param price * @param productCode * @param description * @param nonStockItemFlag * @param kitProductFlag * @param qty * @param grossValue * @param value */
1 回答
- 1 回答
- 0 关注
- 330 浏览
添加回答
举报
0/150
提交
取消