I have a spinner and I am trying to populate it manually in the java file, but every time I run the app I get a force close message.
Eclipse does not display any errors.
Here is my code:
String[] items = new String[] {"One", "Two", "Three"};
Spinner testlist = new Spinner(getApplicationContext());
ArrayAdapter <String> adapter =
new ArrayAdapter <String> (BlehActivity.this, android.R.layout.simple_spinner_item,items );
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
testlist.setAdapter(adapter);
ll1.addView(testlist);
Use Activitys context to create the Spinner, as you are attaching Spinner to the Activity Layout.