title: Change theme of TimePickerDialog to use AppTheme
body: <p>I have implemented a <code>TimePickerDialog</code> using the following code as given in <a href="http://developer.android.com/guide/topics/ui/controls/pickers.html#TimePickerFragment" rel="noreferrer">developer.android.com</a>:</p>
  
  <pre><code>public static class TimePickerFragment extends DialogFragment
                          implements TimePickerDialog.OnTimeSetListener {
  
  @Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
      // Use the current time as the default values for the picker
      final Calendar c = Calendar.getInstance();
      int hour = c.get(Calendar.HOUR_OF_DAY);
      int minute = c.get(Calendar.MINUTE);
  
      // Create a new instance of TimePickerDialog and return it
      return new TimePickerDialog(getActivity(), this, hour, minute,
              DateFormat.is24HourFormat(getActivity()));
  }
  
  public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
      // Do something with the time chosen by the user
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I get a dialog like this one:</p>
  
  <p><a href="https://i.stack.imgur.com/bmtmj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bmtmj.png" alt="enter image description here"></a></p>
  
  <p>I want to change the theme of the <code>TimePickerDialog</code> to go with the <code>AppTheme</code> which extends an <code>AppCompat</code> theme. When i do use the other constructor as told by some, the theme works, but the <code>Dialog</code> goes fullscreen. The code i used for that was:</p>
  
  <pre><code>// Create a new instance of TimePickerDialog and return it
          return new TimePickerDialog(getActivity(), R.style.AppTheme, this, hour, minute,
                  DateFormat.is24HourFormat(getActivity()));
  </code></pre>
  
  <p>I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/gI4Oq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gI4Oq.png" alt="enter image description here"></a></p>
  
  <p>How do i go about this? - I want the <code>Dialog</code> to remain the same, but change only the accent colors. Thanks!</p>