title: Show TimePicker with minutes intervals in android
body: <p>My application show a TimePickerDialog to set a time.
  I want that the timePickerDialog show the minutes with an interval of 5 minutes.</p>
  
  <p>This works fine with this code:</p>
  
  <pre><code>private final int TIME_PICKER_INTERVAL=5;
  private boolean mIgnoreEvent=false;
  …
      public TimePickerDialogs(Context arg0, OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView) {
      super(arg0, callBack, hourOfDay, minute, is24HourView);
  
      formato=Statics.formato;
  }
  
  @Override
  public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
      //super.onTimeChanged(arg0, arg1, arg2);
  
      if (mIgnoreEvent)
          return;
      if (minute%TIME_PICKER_INTERVAL!=0){
          int minuteFloor=minute-(minute%TIME_PICKER_INTERVAL);
          minute=minuteFloor + (minute==minuteFloor+1 ? TIME_PICKER_INTERVAL : 0);
          if (minute==60)
              minute=0;
          mIgnoreEvent=true;
          view.setCurrentMinute(minute);
          mIgnoreEvent=false;
      }
  }
  </code></pre>
  
  <p>Although only minutes can be selected with an interval of five minutes, the timepickerdialog looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/0qJhZ.jpg" alt="hours and minutes"></p>
  
  <p>do not know how the minutes also show the range of 5 minutes, as in this picture:</p>
  
  <p><img src="https://i.stack.imgur.com/cHiSb.jpg" alt="hours and minutes - 5"></p>
  
  <p>I have searched but can not find the solution.</p>