Skip to content

Conversation

@jbarr21
Copy link

@jbarr21 jbarr21 commented Jan 20, 2017

With the LayoutInflater and ContextWrapper moved to ViewPump, Calligraphy can be refactored into a ViewPump interceptor.

This refactored version of Calligraphy will be namespaced as calligraphy3 due to the major breaking changes. This PR depends on SNAPSHOT version of ViewPump provided through mavenLocal(), but will update it when a hosted snapshot becomes available.

Copy link
Member

@chrisjenx chrisjenx left a comment

Choose a reason for hiding this comment

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

Let's also make this 14+ not that it probably makes much difference?

}

public Builder setFontMapper(FontMapper fontMapper) {
this.fontMapper = fontMapper;
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this FontMapper into a different PR?

Copy link
Author

Choose a reason for hiding this comment

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

sure, will do


import io.github.inflationx.viewpump.ReflectionUtils;

class CalligraphyFactory {
Copy link
Member

Choose a reason for hiding this comment

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

Do you think this should still be called Factory? The ViewPump#Interceptor calls into these methods right?

Copy link
Author

Choose a reason for hiding this comment

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

Factory doesn't make as much sense now since it's further from the LayoutInflater.Factory, but I can't think of a better name. maybe just Calligraphy?

textViewFont = CalligraphyUtils.pullFontPathFromTheme(context, styleForTextView[0], mAttributeId);
}

textViewFont = applyFontMapper(textViewFont);
Copy link
Member

Choose a reason for hiding this comment

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

again pull out into a seperate PR

Copy link
Author

Choose a reason for hiding this comment

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

👍


dependencies {
compile 'io.github.inflationx:viewpump:0.1.0-SNAPSHOT'
compile 'com.android.support:appcompat-v7:24.0.0'
Copy link
Author

Choose a reason for hiding this comment

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

@chrisjenx what do you think about dependencies here? keep viewpump compile or change to provided? what about appcompat, too?

@jbarr21
Copy link
Author

jbarr21 commented Jan 30, 2017

Let's also make this 14+ not that it probably makes much difference?

sounds good. I just kept it the same as the original lib, but happy to make the bump to 14

@jbarr21
Copy link
Author

jbarr21 commented Jan 31, 2017

Addressed comments

@chrisjenx chrisjenx merged commit 6484b19 into master Feb 5, 2017
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.

3 participants