ahampe / KDVS

Android app for streaming 90.3 FM in Davis, CA, live from anywhere
1 stars 0 forks source link

Refactor music item ontology #41

Open rpeg opened 5 years ago

rpeg commented 5 years ago

Ideally, our classes referencing music items (e.g. TopMusic, Track) should be refactored such that we have a single 'MusicDetailsFragment', since they have similar use-cases. I started work on this awhile back (by creating an abstract MusicEntity class) but ran into some issues.

Namely, when data-binding the MusicDetails layout, we would need to know at runtime whether we're binding TopMusic or Tracks. I'm sure there's a canonical way to do this, but binding through the XML seems problematic with this approach.