Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options for custom typeface and make recyclerview a provided dependency #71

Merged
merged 3 commits into from
Jan 24, 2015

Conversation

ZacSweers
Copy link
Contributor

Two parts:

  • Added options for setting custom typefaces for the snackbar text and action label, with an update to the sample app for this.
  • Make RecyclerView a provided dependency.

To elaborate on the second part a bit (from the commit message):

If a developer doesn't use it, then this becomes an unnecessary extra dependency that exists for the sole purpose of attaching to and dismissing when a recyclerview scrolls. By marking it provided (and moving some code around), we can make sure this there for the developers that need it without unnecessarily burdening other developers with it as a transitive dependency.

I did the same thing for @afollestad's Material-Dialogs library as well a few weeks back. A library should be as lean as possible, and using provided allows for that flexibility. The only downside here is that you lose the compile-time type checking on the attachToRecyclerView method and instead have to have it at runtime.

If a developer doesn't use it, then this becomes an unnecessary extra dependency that exists for the sole purpose of attaching to and dismissing when a recyclerview scrolls. By marking it provided (and moving some code around), we can make sure this there for the developers that need it without unnecessarily burdening other developers with it as a transitive dependency.
@ZacSweers
Copy link
Contributor Author

Here's a screenshot of the custom font setting in action

device-2015-01-23-011022

@wmora
Copy link
Contributor

wmora commented Jan 24, 2015

thanks!

wmora added a commit that referenced this pull request Jan 24, 2015
Add options for custom typeface and make recyclerview a provided dependency
@wmora wmora merged commit 0371429 into nispok:master Jan 24, 2015
@ZacSweers
Copy link
Contributor Author

Happy to help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants