Closed sunnat629 closed 6 years ago
I'm sorry, but the Popup menu is not a part of the library. It's something I quickly wrote for showcasing BetterLinkMovementMethod
in a sample project. I do not expect people to use it in actual projects because it's not properly tested and I do not intend to provide support for it. :)
Thanks for your response. :)
OS: Naugate and Oreo
I am working on a project where I need to use TextView in Listview with verious String types like URL, Phone Number, Email etc. I have implement your lib and it works in activities but in the listview, I am facing some problem.
Assume, I have a dynamic listview with String content. At first, the popup menu doesn't show from the linkify. If I scroll up/down, it works again. Need to add that in Lolipop, it works like a charm.
Is there any solution regarding this.
Here is the sample of my XML and Java Code -
-- in list adaper -
public View getView(int position, View view, ViewGroup parent) { ... BetterLinkMovementMethod.linkify(Linkify.ALL, mViewGroup).setOnLinkClickListener(urlClickListener); }
private BetterLinkMovementMethod.OnLinkClickListener urlClickListener = new BetterLinkMovementMethod.OnLinkClickListener() { @Override public boolean onClick(TextView textView, String url) { if (isPhoneNumber(url)) { PhoneLinkPopupMenu phonePopupMenu = new PhoneLinkPopupMenu(activity, textView, url.replace("tel:", "")); phonePopupMenu.show(); } return true; } };