MultiSpinner默认文本未显示在android中

loading...


0

多选默认文本在Android中不显示我在android中使用multiSelection Spinner时无法设置默认文本

@Override
public boolean performClick() {
    AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
    builder.setTitle("Please select!!!");
    builder.setMultiChoiceItems(_items, mSelection, this);
    _itemsAtStart = getSelectedItemsAsString();

    builder.setPositiveButton("Submit", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            System.arraycopy(mSelection, 0, mSelectionAtStart, 0, mSelection.length);
            listener.selectedIndices(getSelectedIndices());
            listener.selectedStrings(getSelectedStrings());
        }
    });
    builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            simple_adapter.clear();
            simple_adapter.add(_itemsAtStart);

            System.arraycopy(mSelectionAtStart, 0, mSelection, 0, mSelectionAtStart.length);
        }
    });
    builder.show();
    return true;
}[![enter image description here][1]][1]

loading...

0回答

No Data

评论

暂时没有评论!