-7
public class CartController extends Application {
final String TAG = CartController.class.getSimpleName();
public static ArrayList<ProductsDetail> productCartArrayList =
new ArrayList<ProductsDetail>();
private CartModel cartModelInstance = new CartModel();
public ProductsDetail getProductsInCartController(int pPosition) {
// Log.v(TAG,"******"+productCartArrayList.get(pPosition));
return productCartArrayList.get(pPosition);
}
public void setProductsInCartController(ProductsDetail products) {
productCartArrayList.add(products);
}
public void removeProductsFromCartController(ProductsDetail products) {
productCartArrayList.remove(products);
}
public CartModel getCart() {
return cartModelInstance;
}
public int getProductsArraylistSize() {
return productCartArrayList.size();
}
public ArrayList<ProductsDetail> getProductArray() {
return productCartArrayList;
}
}
你做了什麼或嘗試過!!?!! – shadygoneinsane
您是否使用過任何IDE來調試您的代碼? – reporter