tags:

views:

30

answers:

1

hi

i am implemented to kids application i am implemented spinner in added array categeory list these are array text list now i am implement these text array list replace in drawable images in spinner how can implemented

personalinformation = (Spinner) findViewById(R.id.SpinnerCategory);
ArrayAdapter<?> adapterDefaultpersonal = ArrayAdapter.createFromResource(Animals.this,R.array.Animalinformation, android.R.layout.simple_spinner_item);
adapterDefaultpersonal.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
personalinformation.setAdapter(adapterDefaultpersonal);
personalinformation.setSelection( getSharedPreferences("", 0).getInt("SpinnerSelection", 0));
personalinformation.setOnItemSelectedListener(new OnItemSelectedListener()
{
public void onItemSelected(AdapterView<?> parent,View v,int position,long id)
{
if(position==0)
{
}});

this is the spinner code i am using array of text list these text replaced to drawable items in to spinner how can implemented some solution i am new in android
A: 

If I understood your question correctly you want to have the spinner show icons instead of text. Then you need to extend your ArrayAdapter to override the getView() to return an imageView instead.
Have a look at this tutorial for more info.

Gobr