title: Android NumberPicker: Set min, max, default from XML
body: <p>Is there a way to set the minimum, maximum and default values of a <a href="http://shanetully.com/2011/12/android-3-x-and-4-x-numberpicker-example/" rel="noreferrer">NumberPicker</a> from the XML Layout?</p>
  
  <p>I'm doing it from within the Activity code:</p>
  
  <pre><code>np = (NumberPicker) findViewById(R.id.np);
  np.setMaxValue(120);
  np.setMinValue(0);
  np.setValue(30);
  </code></pre>
  
  <p>XML is obviously more appropriate , because it defines property, not behaviour. </p>
  
  <p>Is there a way to set these using the XML layout?</p>