private void updateEnableState() { setEnabled(SnapApp.getDefault().getProductManager().getProductCount() > 0); } }
public CloseAllProductsAction() { super(Bundle.CTL_CloseAllProductsActionName()); ProductManager productManager = SnapApp.getDefault().getProductManager(); productManager.addListener(new CloseAllProductListener()); setEnabled(false); }