title: Is there a way to get the time of the TimePicker without using the TimePickerDialog?
body: <p>I want to know if there is a way to get the time that the user has set in a TimePicker on the screen without using a Dialog. I don't see the point in creating a button that will pop up a TimePickerDialog when I can just have the TimePicker on the screen. I.e. There is no point in having two TimePickers as can be seen in this tutorial and many other similar TimePicker tutorials: <a href="http://www.mkyong.com/android/android-time-picker-example/" rel="nofollow">http://www.mkyong.com/android/android-time-picker-example/</a></p>
  
  <p>I am using picker.getCurrentHour() and picker.getCurrentMinute() but it just returns me the system's current time after I press a button. Is there no way to get the time that the user has entered?</p>
  
  <p>This is how I retrieve the time after clicking a button:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_set_time);
      picker = new TimePicker(SetTimeActivity.this);
      Button save=(Button)findViewById(R.id.saveAlarmButton); 
      save.setOnClickListener(onSave);                
  }
  
  private View.OnClickListener onSave=new View.OnClickListener()
  {
      public void onClick(View v)
      {
          hour=picker.getCurrentHour();
          min=picker.getCurrentMinute();
  
          System.out.println(hour + " : " + min);         
      }
  };
  
  
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context=".SetTimeActivity" &gt;
  
  &lt;Button
      android:id="@+id/saveAlarmButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/timePicker"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="28dp"
      android:text="Save" /&gt;
  
  &lt;TimePicker
      android:id="@+id/timePicker"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/textView1"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="32dp" /&gt;
  
  &lt;TextView
      android:id="@+id/textView1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="26dp"
      android:text="Set time for alarm"
      android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>But it just gives me the current time. </p>