title: Disable soft keyboard on NumberPicker
body: <p>I'm trying to deactivate the soft keyboard when using a NumberPicker to enter numerical values (for aesthetic reasons). This is my layout-xml-code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:id="@+id/linearLayout2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:layout_marginBottom="30dp"
          android:layout_marginTop="30dp" &gt;
  
          &lt;NumberPicker
              android:id="@+id/repetitionPicker"
              android:layout_width="40dp"
              android:layout_height="wrap_content" /&gt;
  
          &lt;TextView
              android:id="@+id/textView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:text="@string/repetitions_short_divider"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;NumberPicker
              android:id="@+id/weightPicker"
              android:layout_width="40dp"
              android:layout_height="wrap_content"
              android:layout_marginLeft="40dp" /&gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_vertical"
              android:text="@string/pounds"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
      &lt;/LinearLayout&gt;
  
  
      &lt;Button
          android:id="@+id/saveButton"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:text="@string/save" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And finally this is the code where I try to block the keyboard in the onCreate()-method:</p>
  
  <pre><code>// hide keyboard
  View.OnClickListener disableKeyBoardListener = new View.OnClickListener() {
      public void onClick(View v) {
          ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE))
                  .hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
      }
  };
  
  ((EditText) weightPicker.getChildAt(1)).setInputType(InputType.TYPE_NULL);
  ((EditText) repetitionPicker.getChildAt(1)).setInputType(InputType.TYPE_NULL);
  
  ((EditText) weightPicker.getChildAt(1)).setOnClickListener(disableKeyBoardListener);
  //((EditText) repetitionPicker.getChildAt(1)).setOnClickListener(disableKeyBoardListener);
  //weightPicker.setOnClickListener(disableKeyBoardListener);
  //repetitionPicker.setOnClickListener(disableKeyBoardListener);     
  
  getWindow().setSoftInputMode(
          WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); 
  </code></pre>
  
  <p>Sadly, the soft keyboard still shows up when clicking on a NumberPicker. Any ideas?</p>