zoo_app/app/src/main/java/com/example/jhalloran/zoo/ui/detail/PenDetailActivity.java
private void configureViewForAnimalType() {
    if (pen instanceof Swimmable) {
      waterVolumeGroup.setVisibility(View.VISIBLE);
      waterTypeGroup.setVisibility(View.VISIBLE);
      airVolumeGroup.setVisibility(View.GONE);
    } else if (pen instanceof Flyable) {
      waterVolumeGroup.setVisibility(View.GONE);
      waterTypeGroup.setVisibility(View.GONE);
      airVolumeGroup.setVisibility(View.VISIBLE);
    } else {
      waterVolumeGroup.setVisibility(View.GONE);
      waterTypeGroup.setVisibility(View.GONE);
      airVolumeGroup.setVisibility(View.GONE);
    }
  }
// Hide / show relevant fields for different pens
Hide / show relevant fields for different pens
Hide / show relevant fields for different pens
private void configureViewForAnimalType() {
    if (pen instanceof Swimmable) {
      waterVolumeGroup.setVisibility(View.VISIBLE);
      waterTypeGroup.setVisibility(View.VISIBLE);
      airVolumeGroup.setVisibility(View.GONE);
    } else if (pen instanceof Flyable) {
      waterVolumeGroup.setVisibility(View.GONE);
      waterTypeGroup.setVisibility(View.GONE);
      airVolumeGroup.setVisibility(View.VISIBLE);
    } else {
      waterVolumeGroup.setVisibility(View.GONE);
      waterTypeGroup.setVisibility(View.GONE);
      airVolumeGroup.setVisibility(View.GONE);
    }
  }
private void configureViewForAnimalType ( ) { if ( pen instanceof Swimmable ) { waterVolumeGroup . setVisibility ( View . VISIBLE ) ; waterTypeGroup . setVisibility ( View . VISIBLE ) ; airVolumeGroup . setVisibility ( View . GONE ) ; } else if ( pen instanceof Flyable ) { waterVolumeGroup . setVisibility ( View . GONE ) ; waterTypeGroup . setVisibility ( View . GONE ) ; airVolumeGroup . setVisibility ( View . VISIBLE ) ; } else { waterVolumeGroup . setVisibility ( View . GONE ) ; waterTypeGroup . setVisibility ( View . GONE ) ; airVolumeGroup . setVisibility ( View . GONE ) ; } }
Hide / show relevant fields for different pens
Hide / show relevant fields for different pens