public ProductDetailViewController(Product product) { this.currentProduct = product; this.order = new Order(product); setTitle(currentProduct.getName()); loadProductData(); getTableView().setTableFooterView(new UIView(new CGRect(0, 0, 0, BottomButtonView.HEIGHT))); tshirtIcon = UIImage.getImage("t-shirt"); bottomView = new BottomButtonView(); bottomView.setButtonText("Add to Basket"); bottomView.setButtonTapListener((b, e) -> addToBasket()); getView().addSubview(bottomView); }
public void update(Product product) { name.setText(product.getName()); descriptionLabel.setText(product.getDescription()); price.setText(product.getPriceDescription()); }