Guest User

Untitled

a guest
Nov 29th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. // general info:
  2. // 2 tables penetrations / products.
  3. // penetration has one or more products.
  4.  
  5. // setting other data of model penetration
  6. penetration.setHeight(spinner4.getSelectedItem().toString());
  7. penetration.setWall(spinner2.getSelectedItem().toString());
  8. penetration.setPosition(position.getText().toString());
  9.  
  10. // Now I'd like to save the selected products from selectboxes
  11. // product 1 + 2 selected
  12.  
  13. products = new RealmList<>();
  14.  
  15. if(selectedStrings != null) {
  16.  
  17.     for (String string : selectedStrings) {
  18.         // Probably wrong as fuck
  19.         Product product = new Product();
  20.         product.setProduct(string);
  21.         products.add(product);
  22.     }
  23.  
  24. }
  25.  
  26. penetration.setProducts(products);
Advertisement
Add Comment
Please, Sign In to add comment