futurice / freesound-android

Unofficial Android client for the Freesound Project
Apache License 2.0
85 stars 16 forks source link

Wrap the Sound objects into DisplayableItems #31

Closed luciapayo closed 8 years ago

luciapayo commented 8 years ago

This is the first step for #15. It also the first step to make a RecyclerAdapter that is generic and not item based so it can be reused.

luciapayo commented 8 years ago

@peter-tackage is this ok to be merged?

peter-tackage commented 8 years ago

@luciapayo I'm back on reviewing now, I'm still not convinced about the int vs enum proposition. I'm trying a few things in the branch to see what works best.

luciapayo commented 8 years ago

@peter-tackage I am getting this compile error: Error:(27, 38) error: package com.ryanharter.auto.value.gson does not exist

Any ideas? (I already cleaned, invalidated cached and restarted :P)

peter-tackage commented 8 years ago

I see the same problem on your branch. I remember seeing something similar before - I'll investigate.

peter-tackage commented 8 years ago

@luciapayo Oddly, I think the problem is that your DisplayableItem definition is not consistent with its Builder.

Parameter type of setter method should be int to match getter com.futurice.freesound.viewmodel.DisplayableItem.type Builder type(@NonNull Type type);

To fix it, change: public abstract int type();

to

public abstract Type type();

luciapayo commented 8 years ago

@peter-tackage It is already public abstract Type type(); and not public abstract int type(); but still does not compile for me :(

peter-tackage commented 8 years ago

@luciapayo Looking at your PR, the signature of DisplayableItem still has public abstract int type();

luciapayo commented 8 years ago

@peter-tackage have you pulled? EDIT: Forget about it, I fixed the Builder but not the attribute declaration :facepalm: Sorry!