AutoFitTextView
AutoFitTextView copied to clipboard
Not working if it has weblink from server
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!
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 .
Hello, thanks for your reply. So its an bug in library? Can we have quick fix if its not that much hard to?
Thanks!
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 .
OH..!! Okay!
Maybe explain the issue more, with a sample. This way others might help.
Not required any customization, just set string having weblink + normal text. You will get issue. Not sure why nobody faced same issue till now.
Just this, for example:
textView.setText("Go checkout my website http://google.com");
?
Yes Right. And this string in from server.
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()));
IF text doesnt have links. Here is output :
Hello @AndroidDeveloperLB did you get my query? Any help?
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.