This is my Spinner with Package names of Installed apps as ArrayList. It works fine but the text on spinner items appear white and the text is not visible untill focused. I need to set the item color to black, how can i?
public class AppList extends Activity
{
private Spinner spinner;
private ArrayList results = new ArrayList();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate( savedInstanceState);
setContentView(R.layout.main);
spinner = (Spinner)findViewById(R.id.Button);
PackageManager pm = AppList.this.getPackageManager();
Intent intent = new Intent( Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
List list = pm.queryIntentActivities(intent,
PackageManager.PERMISSION_GRANTED);
for (ResolveInfo rInfo : list)
{ results.add(rInfo.activityInfo.packageName.toString());
}
spinner.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, results));
}}