Android: How do you create spinners that look the same in an activity? -


edit: fixed using same adapter on both spinners.

i have 2 spinners in activity , different. 1 looks touch friendly , other doesn't. how make them use same design?

spinner spinner1 = (spinner) findviewbyid(r.id.spinner1); arrayadapter<charsequence> adapter = arrayadapter.createfromresource(         this, r.array.raddix_array, android.r.layout.simple_spinner_item); adapter.setdropdownviewresource(android.r.layout.simple_spinner_dropdown_item); spinner1.setadapter(adapter);  spinner spinner2 = (spinner) findviewbyid(r.id.spinner2); arrayadapter<charsequence> adapter2 = arrayadapter.createfromresource(         this, r.array.raddix_array, android.r.layout.simple_spinner_item); adapter.setdropdownviewresource(android.r.layout.simple_spinner_dropdown_item); spinner2.setadapter(adapter2);  spinner1.setonitemselectedlistener(this); spinner2.setonitemselectedlistener(this); 

i imagine somewhere in xml defines 2 spinners. ensure of relevant properties same within xml (such enabled).


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -