Closed kaplanerkan closed 7 years ago
Excellent idea, I will add a method for string arrays in the next release.
Meanwhile you can use the following:
.items(getResources().getStringArray(R.array.xxxx))
danke dir :-)
Hello Eltos,
how can i download v 1.2?
thanks
sorry, i found it into MASTER-Branch.
It work now:
Bundle extras = new Bundle();
//extras.putIntArray("labels", data);
extras.putStringArray("labels", getResources().getStringArray(R.array.country_arrays));
SimpleListDialog.build()
.title(R.string.select_one)
.choiceMode(SimpleListDialog.SINGLE_CHOICE) // _DIRECT
.choiceMin(1)
.items(getResources().getStringArray(R.array.country_arrays))
.extra(extras)
.show(MainActivity.this, LIST_DIALOG);
and choice-Result;
case LIST_DIALOG:
ArrayList<Integer> pos = extras.getIntegerArrayList(SimpleListDialog.SELECTED_POSITIONS);
//int[] label = extras.getIntArray("labels");
String[] myArrays_str= extras.getStringArray("labels");
int position = pos.get(0);
System.out.println("AUSWAHL " + myArrays_str[position]);
//
Hello,
I love your plugins and will add in my app but can you please add a new features?
I define my Arrays in strings.xml
and use like a spinner in your sample app (onSingleClick)
and crash;
Can you please add this features an we can user your plugins with R.array.xxxx ???
Thanks erkan kaplan