Sunday, May 20, 2012

Blog

By SuperUser Account on 10/28/2011 8:47 PM
Recently, I ran into an issue with SermonTrackr for Android that took me more than a few minutes to figure out. My task was to set the selection of the Spinner control to the ServiceType specified on the Service. I have a Spinner control that contains a list of ServiceType entities (inheriting BaseEntity). The signature of the BaseEntity and ServiceType are below:

1: @SuppressWarnings("serial") 2: public abstract class BaseEntity implements Serializable { 3: public int id; 4: } 5:  6: public class ServiceType extends BaseEntity { 7: public String serviceTypeName; 8: }



When the ServiceActivity loads, I needed to set the selected ServiceType on the Spinner. I had the id of the ServiceType, but that does not necessarily match the index of the items as they appear on the Spinner. In order to get the position of the selected item in the Spinner, I iterated through...

Blog

Custom Objects and Android Spinners

Blog

There are no recent comments on this blog.

Blog

Blog

Skip Navigation Links.

Blog

Copyright 2011 by Burris Consulting Group LLC