更新时间:2023-01-24 10:26:46
您一切正常,除非您未将适配器与Spinner绑定.使用此设置转台的适配器.
You doing everything ok, except your are not binding adapter with spinner. Use this to set Adapter for spinner.
stringName.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
View v = inflater.inflate(R.layout.fragment_palette,container,false);
spinner = v.findViewById(R.id.spinner);
spinner.setAdapter(stringName )