i have a four wheel picker with words in each wheel my problem at the moment is that each wheel is pulling in the same words you can see the code below.
My question is can someone help me in giving each of the wheels there own arrays of words. In the XML below you can see each wheel has its own ID but i cannot figure out how to use them in the java so each wheel has its own specific array.
private void initWheel(int id) {
WheelView wheel = getWheel(id);
wheel.setViewAdapter(new ArrayWheelAdapter<String>(this, new String[]{"Abc", "Foo", "Bar"}));
wheel.setCurrentItem((int)(Math.random() * 10));
wheel.addChangingListener(changedListener);
wheel.addScrollingListener(scrolledListener);
wheel.setCyclic(true);
wheel.setInterpolator(new AnticipateOvershootInterpolator());
}
private WheelView getWheel(int id) {
return (WheelView) findViewById(id);
}
My XML is
<kankan.wheel.widget.WheelView
android:id="@+id/passw_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<kankan.wheel.widget.WheelView
android:id="@+id/passw_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<kankan.wheel.widget.WheelView
android:id="@+id/passw_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<kankan.wheel.widget.WheelView
android:id="@+id/passw_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />