title: how to display ArrayList items in Android wheel picker
body: <p>i want to display my array list items in wheel picker. i got some samples, but it used array items only. Any possible is there without convert array list into array.
  i refer this link.
  <a href="http://code.google.com/p/android-wheel/source/browse/trunk/wheel/src/kankan/wheel/demo/SlotMachineActivity.java?r=17" rel="nofollow">http://code.google.com/p/android-wheel/source/browse/trunk/wheel/src/kankan/wheel/demo/SlotMachineActivity.java?r=17</a></p>
  
  <p>here my java code:</p>
  
  <pre><code>public class WheelViewActivity extends Activity {
  Bundle getBundle;
  ArrayList&lt;String&gt; bikeItemList;
  String itemKeyName;
  String wheelMenu1[] = new String[]{"Right Arm", "Left Arm", "R-Abdomen", "L-Abdomen", "Right Thigh", "Left Thigh"};
  
  // Wheel scrolled flag
  private boolean wheelScrolled = false;
  
  private TextView text;
  private EditText text1;
  
  
  @Override
  public void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.wheel);
  
          initWheel1(R.id.p1);
  
           getBundle = new Bundle();
           getBundle=getIntent().getExtras();           
           bikeItemList = getBundle.getStringArrayList("ItemKey");
  
          System.out.println("WheelView bikeList"+bikeItemList);
          String[] targetArray= bikeItemList.toArray(new String[bikeItemList.size()]);
  
          /*String[] targetArray = new String[bikeItemList.size()];
           targetArray=bikeItemList.toArray(targetArray); 
           for (int i = 0; i &lt; bikeItemList.size(); i++) {
               targetArray[i] = bikeItemList.get(i); 
  
               System.out.println("Wheelview bikeArray"+targetArray);
          }*/
  
  
  
          text1 = (EditText) this.findViewById(R.id.r1);          
          text = (TextView) this.findViewById(R.id.result);
      }
  
  // Wheel scrolled listener
  OnWheelScrollListener scrolledListener = new OnWheelScrollListener()
      {
          public void onScrollStarts(WheelView wheel)
              {
                  wheelScrolled = true;
              }
  
          public void onScrollEnds(WheelView wheel)
              {
                  wheelScrolled = false;
                  updateStatus();
              }
      };
  
  // Wheel changed listener
  private final OnWheelChangedListener changedListener = new OnWheelChangedListener()
      {
          public void onChanged(WheelView wheel, int oldValue, int newValue)
              {
                  if (!wheelScrolled)
                      {
                          updateStatus();
                      }
              }
      };
  
  /**
   * Updates entered PIN status
   */
  private void updateStatus()
      {
  
       PreferenceConnector.writeString(WheelViewActivity.this,itemKeyName,
               wheelMenu1[getWheel(R.id.p1).getCurrentItem()]);
  
          text1.setText(wheelMenu1[getWheel(R.id.p1).getCurrentItem()]);
          text.setText(wheelMenu1[getWheel(R.id.p1).getCurrentItem()]);
      }
  
  /**
   * Initializes wheel
   * 
   * @param id
   *          the wheel widget Id
   */
  
  private void initWheel1(int id)
      {
          WheelView wheel = (WheelView) findViewById(id);         
          wheel.setAdapter(new ArrayWheelAdapter&lt;String&gt;(wheelMenu1));        //here i want to display my bikeitem list. i try but force close.   
          wheel.setVisibleItems(5);
          wheel.setCurrentItem(0);
          wheel.addChangingListener(changedListener);
          wheel.addScrollingListener(scrolledListener);
      }
  /**
   * Returns wheel by Id
   * 
   * @param id
   *          the wheel Id
   * @return the wheel with passed Id
   */
  private WheelView getWheel(int id)
      {
          return (WheelView) findViewById(id);
      }
  
  /**
   * Tests wheel value
   * 
   * @param id
   *          the wheel Id
   * @param value
   *          the value to test
   * @return true if wheel value is equal to passed value
   */
  private int getWheelValue(int id)
      {
          return getWheel(id).getCurrentItem();
      }
  </code></pre>
  
  <p>}</p>