title: Custom TimePicker
body: <p>I want to create a custom TimePicker with a 15-minute interval. I found a lot of resources around the Internet showing examples about custom TimePickerDialog.</p>
  
  <p>I don't have any idea about how to implement a custom TimePicker. For the moment, I have this in my XML layout:</p>
  
  <pre><code>&lt;TimePicker 
      android:id="@+id/timePicker"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" /&gt;
  </code></pre>
  
  <p>and I instantiate it in my Java this way:</p>
  
  <pre><code>tp = (TimePicker) findViewById(R.id.timePicker);
  </code></pre>
  
  <p>There are many questions I'm asking myself:</p>
  
  <ol>
  <li>What must I do to get a CustomTimePicker? Is extending Android's native TimePicker enough?</li>
  <li>What methods must be overridden to implement the 15-minute interval?</li>
  <li>If I manage to get my CustomTimePicker, how to declare it in my XML, since Android's parser won't understand a <code>&lt;CustomTimePicker /&gt;</code> tag?</li>
  </ol>
  
  <p>Thanks for your help!</p>