title: How do I customize timepicker to only show/set hours 1-12 without (am/pm and minutes) API 19 and disable Listeners
body: <p>i want to use a TimePicker to show the position of a medical phenomenon in context to the human body.</p>
  
  <p>Example: Person A has a wound on his right foot at 7 o'clock. (For picture of right foot inner side)</p>
  
  <p>For this I want to use a TimePicker that uses the clock display and only enable hours from 1-12 and disable the am/pm picker and the minute picker.</p>
  
  <p>Second problem I need to use API 19 which does not support set/get hours/minutes. (Saw that while testing, don't know if that affects more methodes from timepicker due to API 23 req.)</p>
  
  <p>To test this i added a time picker in an example project:</p>
  
  <p><strong>activity_main.xml</strong> :</p>
  
  <pre><code>&lt;TableLayout 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:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"&gt;
  
  &lt;TableRow
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
      &lt;LinearLayout
          android:layout_height="wrap_content"
          android:layout_width="fill_parent"
          android:orientation="horizontal"&gt;
          &lt;EditText
              android:id ="@+id/edit_Message"
              android:layout_weight="1"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:hint="@string/edit_message"/&gt;
  
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/button_send"
              android:onClick="sendMessage"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/TableRow&gt;
  &lt;TableRow&gt;
      &lt;LinearLayout&gt;
          &lt;TimePicker
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/timePicker"
              android:layout_column="1"
              android:timePickerMode="clock" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/TableRow&gt;
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>The timepicker above has the hours, minutes and am/pm picker and also has a digital and radial clock to pick the time directly (no wheel). That is allready the form I want.</p>
  
  <p>For picking time I can switch from hours to minutes by clicking the digital clock or by clicking on the radial clock (selecting an hour sets hours and swiches to minutes, which also switches the analoge clock from 1-12 to 00 - 55.)</p>
  
  <p>I want to disable the switch from radial clock clicked (hours->minutes) and disable the minute part on the digital clock.</p>
  
  <p>Under <a href="http://developer.android.com/reference/android/widget/TimePicker.html" rel="nofollow">http://developer.android.com/reference/android/widget/TimePicker.html</a> I didn't find anything usefull that could point me to a solution. </p>
  
  <p>So i looked at the timepicker via debugger and accessed the "components" of the timepicker individualy.</p>
  
  <p>From <strong>MainActivity.java</strong>:</p>
  
  <pre><code>    @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      TimePicker picker = (TimePicker) findViewById(R.id.timePicker);
      picker.setIs24HourView(false);
      LinearLayout pickerLL = (LinearLayout) picker.getChildAt(0); //only child of timepicker
      RelativeLayout digitalRL = (RelativeLayout) pickerLL.getChildAt(0); //child 0 is digital clock, child 1 is radial clock
      AppCompatTextView minutesTV = (AppCompatTextView) digitalRL.getChildAt(2); //TextView of minutes
      minutesTV.setClickable(false);
      //minutesTV.setVisibility(View.GONE);
      LinearLayout ampmLL = (LinearLayout) digitalRL.getChildAt(3); // Layout of the am / pm picker
      ampmLL.setVisibility(View.GONE);
  
      picker.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {
          @Override
          public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
              //Put the change for timepicker hour here
          }
      });
  
  }
  </code></pre>
  
  <p>So i was able to make minutes not clickable and am/pm picker invisibil (gone).</p>
  
  <p>How do i find the Listener that switches the radial clock from hours to minutes?</p>