public void onHigherLevel(View view){
  IndoorBuilding building=mMap.getFocusedBuilding();
  if (building != null) {
    List<IndoorLevel> levels=building.getLevels();
    if (!levels.isEmpty()) {
      int currentLevel=building.getActiveLevelIndex();
      int newLevel=currentLevel - 1;
      if (newLevel == -1) {
        newLevel=levels.size() - 1;
      }
      IndoorLevel level=levels.get(newLevel);
      setText("Activiating level " + level.getName());
      level.activate();
    }
 else {
      setText("No levels in building");
    }
  }
 else {
    setText("No visible building");
  }
}

public void onHigherLevel ( View view ) { IndoorBuilding building = mMap . getFocusedBuilding ( ) ; if ( building != null ) { List < IndoorLevel > levels = building . getLevels ( ) ; if ( ! levels . isEmpty ( ) ) { int currentLevel = building . getActiveLevelIndex ( ) ; int newLevel = currentLevel - 1 ; if ( newLevel == - 1 ) { newLevel = levels . size ( ) - 1 ; } IndoorLevel level = levels . get ( newLevel ) ; setText ( "Activiating level " + level . getName ( ) ) ; level . activate ( ) ; } else { setText ( "No levels in building" ) ; } } else { setText ( "No visible building" ) ; } }
called when the activate higher level is clicked .
