ArrayAdapter requires the resource ID to be a TextView in DialogFragment
问题 I use an ArrayAdapter in a DialogFragment, that work on Android 4.0 and more but not in 2.3. @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); // Get the layout inflater LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.dialog, null); Spinner spReglement; spReglement = (Spinner)view.findViewById(R.id.listReglements); ArrayAdapter<String> adapterList = new