I have this weird bug going on with the Spinner, When I tap the spinner, all I see is this
I can still select values, and they interact with the app like they're supposed to, so I guess it's white text on a white background.
After some research, I've tried changing the adapter's first argument to this instead of letterSpinner.getContext() no luck, I also tried this.getApplicationContext() and, I have even tried many different android.R.layout. values for the adapter's second argument, same white on white results.
It's weird, it was working fine before, all the editing I've been doing of this app didn't touch any of the Spinner's code, here's all my code related to the Spinner:
letters = getResources().getStringArray(R.array.letters_array);
lettersForAdapter = new ArrayList<String>(Arrays.asList(letters));
letterSpinner = (Spinner)findViewById(R.id.letterSpinner);
spinnerAdapter = new ArrayAdapter<String>(letterSpinner.getContext(),
android.R.layout.simple_spinner_dropdown_item, lettersForAdapter);
letterSpinner.setAdapter(spinnerAdapter);
letterSpinner.setOnItemSelectedListener(new OnItemSelectedListener()
{
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if(position == 0) //So 'Select a Letter' does nothing.
return; //Do nothing.
else
{
//Check for a match.
checkForMatch(parent.getSelectedItem().toString());
//Remove the letter.
spinnerAdapter.remove(parent.getSelectedItem().toString());
spinnerAdapter.notifyDataSetChanged();
//Ensures that the Spinner won't recursively call itself when an item is removed.
letterSpinner.setSelection(0);
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
//Do nothing.
}
});
XML:
<Spinner
android:id="@+id/letterSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="@array/letters_array" />
Any ideas as to the cause of this problem?