Skip to content

Fixed #245: different padding between lines #315

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

Closed
wants to merge 1 commit into from

Conversation

alexcustos
Copy link
Contributor

No description provided.

@mgod mgod force-pushed the master branch 2 times, most recently from bdb918d to 6bc7cd4 Compare August 24, 2017 19:40
Copy link
Contributor

@mgod mgod left a comment

Choose a reason for hiding this comment

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

I'd love to get this bug fixed and this seems like a pretty good approach. There are a few details that should be changed.


private static final String TAG = ViewSpan.class.getSimpleName();

private static final char SENTINEL = ',';
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not really comfortable adding a dependency on how the overall view is configured here. SENTINEL matches the default implementation, but breaks in some common cases like hashtags depending on configuration.

// NOTE: only the first tag (measure) has ~2dp "padding"
// NOTE: a string with the single tag can be trimmed up to span height when the layout is inflated
String str = text.toString();
str = str.substring(0, str.lastIndexOf(SENTINEL) + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect rather than using a SENTINEL here, you can probably search for spans in the text and use that to figure out if there are mote.

@alexcustos
Copy link
Contributor Author

Thanks for your notices, I hope I will find some time soon to revise this pull request and the #313 one.

@mgod
Copy link
Contributor

mgod commented Nov 2, 2017

Closed via #326

@mgod mgod closed this Nov 2, 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.

2 participants