public class MainActivity extends AppCompatActivity { private Spinner spinner1; // nie wymusza niemutowalnosci private ArrayAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); spinner1=findViewById(R.id.spinner1); adapter=ArrayAdapter.createFromResource(this, R.array.elementy, androidx.appcompat.R.layout.support_simple_spinner_dropdown_item); spinner1.setAdapter(adapter); } Czerwony Zielony Niebieski