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

singleLine and ellipsize #278

Closed
0mar-ahmed opened this issue Apr 26, 2018 · 19 comments
Closed

singleLine and ellipsize #278

0mar-ahmed opened this issue Apr 26, 2018 · 19 comments
Assignees

Comments

@0mar-ahmed
Copy link

When i set android:singleLine="true" to EmojiTextView
if the line contain emoji in the end of it show a part of this emoji after the ellipsize (...)

https://imgur.com/a/z631RHe

@vanniktech
Copy link
Owner

I don't quite follow.

@0mar-ahmed
Copy link
Author

Hello Niklas

i am trying to set singleLine attribute to EmojiTextViews so if the text is more than one line it should truncate it to one line and add three dots in the end of line like this (...)
https://imgur.com/a/KkhxJmb

it's all fine when this text doesn't contain emojis
but when it has emojis in the end of the text a portion of the emoji appears after the three dots in the end
https://imgur.com/a/JSx9OAh

if you want test it yourself to get idea about it
add android:singleLine="true" to adapter_chat.xml
and try to type very long text that has emojis in the end

thanks

@vanniktech
Copy link
Owner

Ah I get it. Okay this can be possibly fixed.

@0mar-ahmed
Copy link
Author

Great i would like to help fixing it but i don't know where exactly the problem
if you can tell me where to look i would love to send you a pull request

@vanniktech
Copy link
Owner

Somewhere in Emojis setText method

@Override @CallSuper public void setText(final CharSequence rawText, final BufferType type) {
and the replaceWithImages method
@Override public void replaceWithImages(final Context context, final Spannable text, final float emojiSize, final float defaultEmojiSize, final EmojiReplacer fallback) {

@0mar-ahmed
Copy link
Author

Hello Niklas

i didn't know which part exactly that should we should modify
actually i don't know why that Span appears anyway

should we stop add spans to the text if its position more the endline position ?

thanks

@vanniktech
Copy link
Owner

Dunno either as I'd investigate too.

@0mar-ahmed
Copy link
Author

Hello Niklas

Any updates? i didn't find out something so far, wbu?

thanks

@vanniktech
Copy link
Owner

No haven't spend any time on it yet.

@vanniktech
Copy link
Owner

I'm closing this issue due to inactivity. If you have any further input on the issue, don't hesitate to reopen this issue or post a new one.

I won't get it to it in the near future. If someone else wants to, feel free to.

@nAkhmedov
Copy link

I am facing the same issue on 0.6.0 version, any news?

@mario mario self-assigned this Oct 23, 2019
@mario mario reopened this Oct 23, 2019
@mario
Copy link
Collaborator

mario commented Oct 23, 2019

I'll look into it.

@mario
Copy link
Collaborator

mario commented Oct 23, 2019

https://issuetracker.google.com/issues/36991688

Google issue. Let me see if it's trivial to workaround.

@KishoreBaktha
Copy link

Any progress on this?

@mario
Copy link
Collaborator

mario commented Nov 7, 2019 via email

@KishoreBaktha
Copy link

Okay, please let me know when you have decided on the solution :)

@vanniktech
Copy link
Owner

@mario gentle push, can we solve this? If not, let's close

@mario
Copy link
Collaborator

mario commented Jan 29, 2020

We can, just I didn't have the time yet.

@vanniktech
Copy link
Owner

Not worth it in my opinion. Feel free to convince me though.

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

No branches or pull requests

5 participants