You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pratikbutani To avoid calling the return key, you can mask a line of code in the OnCancel method of the multispinnersearch class。
` @OverRide
public void onCancel(DialogInterface dialog) {
// refresh text on spinner // super.performClick()
StringBuilder spinnerBuffer = new StringBuilder();
ArrayList<KeyPairBoolData> selectedData = new ArrayList<>();
for (int i = 0; i < items.size(); i++) {
KeyPairBoolData currentData = items.get(i);
if (currentData.isSelected()) {
selectedData.add(currentData);
spinnerBuffer.append(currentData.getName());
spinnerBuffer.append(", ");
}
}
String spinnerText = spinnerBuffer.toString();
if (spinnerText.length() > 2)
spinnerText = spinnerText.substring(0, spinnerText.length() - 2);
else
spinnerText = this.getHintText();
//
ArrayAdapter adapterSpinner = new ArrayAdapter<>(getContext(), R.layout.simple_spinner, new String[]{spinnerText});
setAdapter(adapterSpinner);
if (adapter != null)
adapter.notifyDataSetChanged();
listener.onItemsSelected(selectedData);
}
`
The text was updated successfully, but these errors were encountered:
@pratikbutani To avoid calling the return key, you can mask a line of code in the OnCancel method of the multispinnersearch class。
`
@OverRide
public void onCancel(DialogInterface dialog) {
// refresh text on spinner
// super.performClick()
StringBuilder spinnerBuffer = new StringBuilder();
//
ArrayAdapter adapterSpinner = new ArrayAdapter<>(getContext(), R.layout.simple_spinner, new String[]{spinnerText});
setAdapter(adapterSpinner);
`
The text was updated successfully, but these errors were encountered: