private void updateView() {
    Type selectedType = (Type) (typeSpinner.getSelectedItem());
    if (selectedType != null) {
      int typeID = selectedType.getId();
      // Load productList by selectedTypeID
      productList = Product.getProductsByType(typeID, getApplicationContext());
    } else {
      productList = Product.getAllProducts(getApplicationContext());
    }

    ArrayAdapter<Product> arrayAdapter =
        new ArrayAdapter<Product>(
            getApplicationContext(), android.R.layout.simple_list_item_1, productList);
    productsListView.setAdapter(arrayAdapter);
  }