Skip to content

Instantly share code, notes, and snippets.

@fnk0
Last active October 16, 2016 21:26
Show Gist options
  • Save fnk0/ffc3c3154d4428d9bae7059cd6ea7591 to your computer and use it in GitHub Desktop.
Save fnk0/ffc3c3154d4428d9bae7059cd6ea7591 to your computer and use it in GitHub Desktop.
Notify details changed
@Override
public void onGenerated(Palette palette) {
PaletteColors colors = PaletteUtils.getPaletteColors(palette);
mFullWidthMovieDetailsPresenter.setActionsBackgroundColor(colors.getStatusBarColor());
mFullWidthMovieDetailsPresenter.setBackgroundColor(colors.getToolbarBackgroundColor());
if (movieDetails != null) {
this.movieDetails.setPaletteColors(colors);
}
notifyDetailsChanged();
}
private void notifyDetailsChanged() {
mDetailsOverviewRow.setItem(this.movieDetails);
int index = mAdapter.indexOf(mDetailsOverviewRow);
mAdapter.notifyArrayItemRangeChanged(index, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment