title: display number picker in horizontal android
body: <p>this is my original number picker which it display in vertical.</p>
  
  <p><img src="https://i.stack.imgur.com/8Jdfj.png" alt="enter image description here"></p>
  
  <p>i want to make it display in horizontal where it will display the buttons left and right instead of up and down. but it does not work. it still looks like vertical.</p>
  
  <p>this is my code.</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_picker);
  
      String[] nums = new String[21];
  
      for(int i=0; i&lt;nums.length; i++)
         nums[i] = Integer.toString(i*5);
  
      NumberPicker np = (NumberPicker) findViewById(R.id.np);
      np.setMaxValue(nums.length-1);
      np.setMinValue(0);
      np.setWrapSelectorWheel(false);
      np.setDisplayedValues(nums);        
  </code></pre>
  
  <p>this is my code for np.xml</p>
  
  <pre><code>&lt;NumberPicker
      android:id="@+id/np"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:width="100dip" /&gt;
  </code></pre>