zoo_app/app/src/main/java/com/example/jhalloran/zoo/ui/create/CreatePenActivity.java
@Override
  public void onItemSelected(AdapterView<?> parent, View view,
      int pos, long id) {
    String itemSelected = parent.getItemAtPosition(pos).toString();
    penTypeSelected = itemSelected;
    switch (itemSelected) {
      case "Aquarium":
        configureActivityForAquarium();
        break;
      case "Aviary":
        configureActivityForAviary();
        break;
      case "Dry pen":
        configureActivityForDryPen();
        break;
      case "Petting pen":
        configureActivityForDryPen();
        break;
      case "Part water part dry pen":
        configureActivityForAquarium();
        break;
    }
  }
// On select Pen type listener. Hide / show relevant fields for different pens
On select Pen type listener. Hide / show relevant fields for different pens
On select Pen type listener . Hide / show relevant fields for different pens
@Override
  public void onItemSelected(AdapterView<?> parent, View view,
      int pos, long id) {
    String itemSelected = parent.getItemAtPosition(pos).toString();
    penTypeSelected = itemSelected;
    switch (itemSelected) {
      case "Aquarium":
        configureActivityForAquarium();
        break;
      case "Aviary":
        configureActivityForAviary();
        break;
      case "Dry pen":
        configureActivityForDryPen();
        break;
      case "Petting pen":
        configureActivityForDryPen();
        break;
      case "Part water part dry pen":
        configureActivityForAquarium();
        break;
    }
  }
@ Override public void onItemSelected ( AdapterView < ? > parent , View view , int pos , long id ) { String itemSelected = parent . getItemAtPosition ( pos ) . toString ( ) ; penTypeSelected = itemSelected ; switch ( itemSelected ) { case "Aquarium" : configureActivityForAquarium ( ) ; break ; case "Aviary" : configureActivityForAviary ( ) ; break ; case "Dry pen" : configureActivityForDryPen ( ) ; break ; case "Petting pen" : configureActivityForDryPen ( ) ; break ; case "Part water part dry pen" : configureActivityForAquarium ( ) ; break ; } }
On select Pen type listener.
On select Pen type listener .