I am trying to make a fully custom spinner. I am running into difficulties with making the layout that pops up when you press on it. Here is my code for my adapter:
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
this, R.array.my_array, R.layout.spinnertext);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
From what I have read in the documentation, the layout used apears to be set by the line:
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
Although every time I change it to a new layout that I make, it makes the app fail when I try and use the spinner. I have tried to look for what "android.R.simple_spinner_dropdown_item" looks like so as to figure out if I am maybe missing anything.
All of my layouts I have tried have been linear or relative layouts, with only a textView.
How can I make a custom layout pop up when the spinner is selected?