I have a Activity that pulls an Array from the previous Activity. I can use this code below which gets the Array from the previous Activity and puts it into a TextView.
Update using initWheel(R.id.passw_1, names.toArray(new String[names.size()])); fixed the problem
ArrayList<String> names = intent.getStringArrayListExtra("KEY");
TextView et2 = (TextView) findViewById(R.id.editText2);
et2.setText("");
if (names.size() > 0) {
for (String str : names) {
et2.append(str + " ");
}
}
This works fine but is not what I need exactly. Instead of it populating a TextView I need it to fill a String which is like this
initWheel(R.id.passw_1, "ArrayList Here");
I have another which will be set by default in the code that looks like this and I need the array to populate the one above in the same format:
initWheel(R.id.passw_2, new String[] { "Foo", "Bar" });
R.id.passw_2it fills the wheel with values "foo" and "bar"