zoo_app/app/src/main/java/com/example/jhalloran/zoo/ui/create/CreateAnimalActivity.java
@Override
  public void onItemSelected(AdapterView<?> parent, View view,
      int pos, long id) {
    String itemSelected = parent.getItemAtPosition(pos).toString();
    animalTypeSelected = itemSelected;
    switch (itemSelected) {
      case "Land animal":
        configureActivityForLandAnimal();
        break;
      case "Flying animal":
        configureActivityForFlyingAnimal();
        break;
      case "Swimming animal":
        configureActivityForSwimmingAnimal();
        break;
    }
  }
// On select Animal type listener. Hide / show relevant fields for different pens
On select Animal type listener. Hide / show relevant fields for different pens
On select Animal 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();
    animalTypeSelected = itemSelected;
    switch (itemSelected) {
      case "Land animal":
        configureActivityForLandAnimal();
        break;
      case "Flying animal":
        configureActivityForFlyingAnimal();
        break;
      case "Swimming animal":
        configureActivityForSwimmingAnimal();
        break;
    }
  }
@ Override public void onItemSelected ( AdapterView < ? > parent , View view , int pos , long id ) { String itemSelected = parent . getItemAtPosition ( pos ) . toString ( ) ; animalTypeSelected = itemSelected ; switch ( itemSelected ) { case "Land animal" : configureActivityForLandAnimal ( ) ; break ; case "Flying animal" : configureActivityForFlyingAnimal ( ) ; break ; case "Swimming animal" : configureActivityForSwimmingAnimal ( ) ; break ; } }
On select Animal type listener.
On select Animal type listener .