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

Not working if it has weblink from server #43

Open
hardikJoshi123 opened this issue Jul 14, 2017 · 11 comments
Open

Not working if it has weblink from server #43

hardikJoshi123 opened this issue Jul 14, 2017 · 11 comments

Comments

@hardikJoshi123
Copy link

hardikJoshi123 commented Jul 14, 2017

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!

@AndroidDeveloperLB
Copy link
Owner

AndroidDeveloperLB commented Jul 14, 2017 via email

@hardikJoshi123
Copy link
Author

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

Thanks!

@AndroidDeveloperLB
Copy link
Owner

AndroidDeveloperLB commented Jul 14, 2017 via email

@hardikJoshi123
Copy link
Author

OH..!! Okay!

@AndroidDeveloperLB
Copy link
Owner

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

@hardikJoshi123
Copy link
Author

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

@AndroidDeveloperLB
Copy link
Owner

Just this, for example:

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

?

@hardikJoshi123
Copy link
Author

Yes Right. And this string in from server.

@hardikJoshi123
Copy link
Author

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
Copy link
Author

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

@AndroidDeveloperLB
Copy link
Owner

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.

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

No branches or pull requests

2 participants