hanggrian / socialview

Android TextView and EditText with hashtag, mention, and hyperlink support
http://hanggrian.com/socialview/
Apache License 2.0
331 stars 81 forks source link

SocialAutoCompleteTextView don't show cursor #6

Closed magnoleal closed 7 years ago

magnoleal commented 7 years ago

Hello Friend,

Is happening to me the following situation, when opening the screen with a SocialAutoCompleteTextView the cursor does not appear in the field, even with the focus on it.

When typing some text the cursor appears normally, even erasing everything it remains there.

That is, it happens when entering the screen and field being empty, only with a hint.

hanggrian commented 7 years ago

@magnoleal Hey there,

I have discovered that TextView (and all it subclasses) behaves exactly what you have described because I explicitly set their movement method. Unfortunately, this movement method is crucial to enable text span clicking detection.

As an immediate fix, I have uploaded version 0.6.2 that will only set movement method when OnSocialClickListener is supplied to the view. So if you have not yet set 'setOnSocialClickListener' on that SocialAutoCompleteTextView, you will be able to see the cursor at activity startup.

Please try it and see if it is an acceptable fix. And thank you very much for such a detailed observation!

magnoleal commented 7 years ago

I did that you made and works perfectly!

Thanks for your quick support!