AutoFitTextView icon indicating copy to clipboard operation
AutoFitTextView copied to clipboard

Not working if it has weblink from server

Open hardikJoshi123 opened this issue 6 years ago • 11 comments

Hello,

Thanks for great library, but can you please suggest how to use this if it has weblinks? ("Go checkout my website http://google.com")

If no weblink, it working awesome.

Thanks!

hardikJoshi123 avatar Jul 14 '17 05:07 hardikJoshi123

No idea. It started from a basic solution that someone else mostly wrote, and I decided it was very useful so I published it with a few tweaks and fixes.

On Fri, Jul 14, 2017 at 8:42 AM, hardikJoshi123 [email protected] wrote:

Hello,

Thanks for great library, but can you please suggest how to use this if it has weblinks? (http://google.com)

If no weblink, it working awesome.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AndroidDeveloperLB/AutoFitTextView/issues/43, or mute the thread https://github.com/notifications/unsubscribe-auth/AFG_1vzQK_E8udluj5B4lRt8QFtPFwjOks5sNv-ugaJpZM4OX2c6 .

AndroidDeveloperLB avatar Jul 14 '17 09:07 AndroidDeveloperLB

Hello, thanks for your reply. So its an bug in library? Can we have quick fix if its not that much hard to?

Thanks!

hardikJoshi123 avatar Jul 14 '17 10:07 hardikJoshi123

Sorry I can't, but maybe others can

On Jul 14, 2017 13:05, "hardikJoshi123" [email protected] wrote:

Hello, thanks for your reply. So its an bug in library? Can we have quick fix if its not that much hard to?

Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndroidDeveloperLB/AutoFitTextView/issues/43#issuecomment-315322957, or mute the thread https://github.com/notifications/unsubscribe-auth/AFG_1ogTm6VfOM6Nl__JVBYAcyOaqEfWks5sNz1ugaJpZM4OX2c6 .

AndroidDeveloperLB avatar Jul 14 '17 10:07 AndroidDeveloperLB

OH..!! Okay!

hardikJoshi123 avatar Jul 14 '17 10:07 hardikJoshi123

Maybe explain the issue more, with a sample. This way others might help.

AndroidDeveloperLB avatar Jul 14 '17 11:07 AndroidDeveloperLB

Not required any customization, just set string having weblink + normal text. You will get issue. Not sure why nobody faced same issue till now.

hardikJoshi123 avatar Jul 17 '17 14:07 hardikJoshi123

Just this, for example:

textView.setText("Go checkout my website http://google.com");

?

AndroidDeveloperLB avatar Jul 17 '17 16:07 AndroidDeveloperLB

Yes Right. And this string in from server.

hardikJoshi123 avatar Jul 17 '17 16:07 hardikJoshi123

Here is code :

<com.lb.auto_fit_textview.AutoResizeTextView
        android:id="@+id/txtblasttexttwoline"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center"
        android:autoLink="web"
        android:ellipsize="end"
        android:gravity="center|left"
        android:includeFontPadding="false"
        android:linksClickable="true"
        android:scrollHorizontally="false"
        android:textSize="20dp"
        android:visibility="visible" />
 txtblasttexttwoline= ( TextView) findViewById(R.id.txtblasttexttwoline);
        txtblasttexttwoline.setEllipsize(TextUtils.TruncateAt.END);
        txtblasttexttwoline.setMovementMethod(LinkMovementMethod.getInstance());
        txtblasttexttwoline.setText("I'm at a company party right now with my work friends! Yay! https://www.google.co.in/");
        txtblasttexttwoline.setTextSize(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, maxHeight, getResources().getDisplayMetrics()));

notworking

IF text doesnt have links. Here is output :

working

hardikJoshi123 avatar Jul 19 '17 06:07 hardikJoshi123

Hello @AndroidDeveloperLB did you get my query? Any help?

hardikJoshi123 avatar Jul 24 '17 06:07 hardikJoshi123

Sorry I had a car accident and I have other things to do currently, plus as I told you I will probably say that I have no idea how to fix it, as I'm not the main author of this code (I only improved it a bit). Maybe later.

AndroidDeveloperLB avatar Jul 24 '17 12:07 AndroidDeveloperLB