PickCharacterActivity.java

Make what enum? The switch function? But it's based on position. How would
I make it enum?

Ashley Thomas
Computer Science
Wellesley College - Class of 2016



On Mon, Jul 7, 2014 at 9:13 PM, syqnew <notifications@github.com> wrote:

> In ParseStarterProject/src/com/parse/starter/PickCharacterActivity.java:
>
> > +		// number of characters
> > +		public int getCount() {
> > +			return 2;
> > +		}
> > +
> > +		public boolean isViewFromObject(View view, Object object) {
> > +			return view == object;
> > +		}
> > +
> > +		public Object instantiateItem(final View collection, final int position) {
> > +			v = new View(collection.getContext());
> > +			LayoutInflater inflater = (LayoutInflater) collection.getContext()
> > +					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
> > +			int resId = 0;
> > +			switch (position) {
> > +			case 0: // surfer
>
> Maybe use an enum rather than arbitrary numbers.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleJump/Diversity/pull/38/files#r14632534>.
>