The spinner arrow appears but the text is not even when I choose one of the spinner options nothing happens appears empty without the option chosen ... the minimum version in my grandle is the maximum 11 version is 24.
My xml:
<Spinner
android:id="@+id/spinnerlinha"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_below="@+id/tvlinhas"
android:background="#000"
android:textSize="20sp"
android:textColor="#ff0000"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:spinnerMode="dropdown"
/>
My code:
linhaSP=(Spinner)findViewById(R.id.spinnerlinha);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_dropdown_item,
linhaNome);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
linhaSP.setAdapter(adapter);
linhaSP.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0,
View arg1, int position, long arg3) {
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});