Why my spinner in android studio doesn't display anything even though i have followed some tutorial? : I'm working a project, and i want to use spinner in it. Firstly, i try some tutorial on youtube and my code successfully to compile, but the problem is my spinner doesn't show any text. Then, i try another tutorial and find solution for my problem from any resource. But, it still not working.
Then i try to make new project that only contains spinner with the same code, it's working perfectly. I don't know why this is happen.
The different between my project and the new project is, my project have navigation drawer. I don't know, but maybe this is related.
sorry for my bad english

this is my xml code for spinner
```xml
<Spinner
        android:id="@+id/spinner"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="50dp"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"/>
```

and this is for my java
```java
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_home);

        Spinner spinner = (Spinner) findViewById(R.id.spinner);

        List<String> categories = new ArrayList<>();
        categories.add(0, "Choose Station");
        categories.add("Station A (Asrama Mahanaim)");
        categories.add("Station B (Asrama Mamre)");
        categories.add("Station C (Asrama Nazareth)");
        categories.add("Station D (Kantin Lama)");
        categories.add("Station E (Studio)");
        categories.add("Station F (GD 8)");
        categories.add("Station G (GD 9)");

        ArrayAdapter<String> adapter;
        adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item);
        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        spinner.setAdapter(adapter);

        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
                if (adapterView.getItemAtPosition(i).equals("Choose Station")) {
                    //do nothing
                } else {
                    String item = adapterView.getItemAtPosition(i).toString();

                    Toast.makeText(adapterView.getContext(), "Selected : " + item, Toast.LENGTH_SHORT).show();
                }
            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {
                //TODO auto-generated method stub
            }
        });
    }
```

this is the output when compiled
[enter image description here][1]


  [1]: https://i.stack.imgur.com/r8kfM.jpg