one spinner, two arrayadapter
I have 2 spinners. If in spinner1 selected the value PKW i want to set a PKW arrayadapter for spinner2. If in spinner1 the value LKW was selected i want to set the arraylist LKW as arrayadapter for spinner2.

I've created 2 arrayadapter for with the correct arraylist. If i start the Activity, it crashes and i'm getting a null pointer exception.

    	final Spinner sPartikelfilterArt = (Spinner) findViewById(R.id.spinnerPMS);

		final ArrayAdapter aPartikelfilterArtPKW = ArrayAdapter.createFromResource(
	            this, R.array.Partikelfilterarten, android.R.layout.simple_spinner_item);

	    final ArrayAdapter aPartikelfilterArtLKWWOMO = ArrayAdapter.createFromResource(
	            this, R.array.PartikelfilterartenLKWWOMO, android.R.layout.simple_spinner_item);
	    
        aPartikelfilterArtPKW.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        aPartikelfilterArtLKWWOMO.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

Maybe someone has an idea why that happens?

Regards,
float
one spinner, two arrayadapter
===

I have 2 spinners. If in spinner1 selected the value PKW i want to set a PKW arrayadapter for spinner2. If in spinner1 the value LKW was selected i want to set the arraylist LKW as arrayadapter for spinner2.

I've created 2 arrayadapter for with the correct arraylist. If i start the Activity, it crashes and i'm getting a null pointer exception.

    	final Spinner sPartikelfilterArt = (Spinner) findViewById(R.id.spinnerPMS);

		final ArrayAdapter aPartikelfilterArtPKW = ArrayAdapter.createFromResource(
	            this, R.array.Partikelfilterarten, android.R.layout.simple_spinner_item);

	    final ArrayAdapter aPartikelfilterArtLKWWOMO = ArrayAdapter.createFromResource(
	            this, R.array.PartikelfilterartenLKWWOMO, android.R.layout.simple_spinner_item);
	    
        aPartikelfilterArtPKW.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        aPartikelfilterArtLKWWOMO.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

Maybe someone has an idea why that happens?

Regards,
float