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

Separate title and description typeface #167

Merged
merged 2 commits into from
May 6, 2017
Merged

Separate title and description typeface #167

merged 2 commits into from
May 6, 2017

Conversation

danimahardhika
Copy link
Contributor

Added textTypeface(titleTypeface, descriptionTypeface)

- Added textTypeface(titleTypeface, descriptionTypeface)
@@ -23,6 +23,7 @@
import android.support.annotation.ColorRes;
import android.support.annotation.DimenRes;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary. The project assumes non null wherever there isn't a nullable annotation


/** Specify the typeface for title and description text **/
public TapTarget textTypeface(@NonNull Typeface titleTypeface, @NonNull Typeface descriptionTypeface) {
this.titleTypeface = titleTypeface;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a friendly API, it is forcing users to specify both, even though a large amount of cases don't need different typefaces between the title and description. This should be split up into titleTypeface and descriptionTypeface builder methods instead.

Additionally these methods need the null check that you removed from the original textTypeface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's needed when using typeface from assets folder. I'm going to change tit.

- titleTypeface(Typeface)
- descriptionTypeface(Typeface)
@xiphirx xiphirx merged commit 729cd17 into KeepSafe:master May 6, 2017
@danimahardhika danimahardhika deleted the patch branch May 6, 2017 07:09
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