{"id":15029804,"url":"https://github.com/armcha/autolinktextview","last_synced_at":"2025-04-12T19:42:07.742Z","repository":{"id":43510000,"uuid":"69183610","full_name":"armcha/AutoLinkTextView","owner":"armcha","description":"AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks.","archived":false,"fork":false,"pushed_at":"2019-10-09T12:34:36.000Z","size":2417,"stargazers_count":1120,"open_issues_count":23,"forks_count":137,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-04T15:55:11.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armcha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-25T18:49:02.000Z","updated_at":"2024-12-10T11:12:17.000Z","dependencies_parsed_at":"2022-09-12T22:24:22.703Z","dependency_job_id":null,"html_url":"https://github.com/armcha/AutoLinkTextView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcha%2FAutoLinkTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcha%2FAutoLinkTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcha%2FAutoLinkTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcha%2FAutoLinkTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armcha","download_url":"https://codeload.github.com/armcha/AutoLinkTextView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625244,"owners_count":21135511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T20:11:39.937Z","updated_at":"2025-04-12T19:42:07.707Z","avatar_url":"https://github.com/armcha.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ~~AutoLinkTextView~~\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AutoLinkTextView-green.svg?style=true)](https://android-arsenal.com/details/1/4419)\n\n## Deprecated\n[22]: https://github.com/armcha/AutoLinkTextViewV2\n### Please use the new version of [AutoLinkTextView][22]\n\nAutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://),\nPhone and Email automatically detecting and ability to handle clicks.\n\n![](screens/gif1.gif)\n\nThe current minSDK version is API level 14 Android 4.0 (ICE CREAM SANDWICH).\n\n## Download sample [apk][77]\n[77]: https://github.com/armcha/AutoLinkTextView/raw/master/screens/AutoLinkTextView.apk\n\n## Features\n\n* Default support for **Hashtag, Mention, Link, Phone number and Email**\n* Support for **custom types** via regex\n* Ability to set text color\n* Ability to set pressed state color\n* Ability to make specific modes **bold**\n\n![](screens/screen1.png)\n-----------------------\n\n## Download\n\nGradle:\n```groovy\ncompile 'com.github.armcha:AutoLinkTextView:0.3.0'\n```\n\n## Setup and usage\n\nAdd AutoLinkTextView to your layout\n```xml\n    \u003ccom.luseen.autolinklibrary.AutoLinkTextView\n         android:id=\"@+id/active\"\n         android:layout_width=\"wrap_content\"\n         android:layout_height=\"wrap_content\" /\u003e\n```\n\n```java\nAutoLinkTextView autoLinkTextView = (AutoLinkTextView) findViewById(R.id.active);\n```\n\nSet up mode or modes\n```java\nautoLinkTextView.addAutoLinkMode(\n                AutoLinkMode.MODE_PHONE);\n```\n\nSet text to AutoLinkTextView\n```java\nautoLinkTextView.setAutoLinkText(getString(R.string.long_text));\n```\n\nSet AutoLinkTextView click listener\n```java\nautoLinkTextView.setAutoLinkOnClickListener(new AutoLinkOnClickListener() {\n            @Override\n            public void onAutoLinkTextClick(AutoLinkMode autoLinkMode, String matchedText) {\n\n            }\n        });\n```\n\nCustomizing\n---------\n\nAutoLinkModes\n\n-------------------------\n#### AutoLinkMode.MODE_PHONE\n\n![](screens/screen2.png)\n-------------------------\n#### AutoLinkMode.MODE_HASHTAG\n\n![](screens/screen3.png)\n-------------------------\n#### AutoLinkMode.MODE_URL\n\n![](screens/screen4.png)\n-------------------------\n#### AutoLinkMode.MODE_MENTION\n\n![](screens/screen5.png)\n-------------------------\n#### AutoLinkMode.MODE_EMAIL\n\n![](screens/screen6.png)\n-------------------------\n#### AutoLinkMode.MODE_CUSTOM\n\n![](screens/screen7.png)\n\nif you use custom mode, you should also add custom regex,\n\n```java\nautoLinkTextView.setCustomRegex(\"\\\\sAllo\\\\b\");\n```\nNote:Otherwise ```MODE_CUSTOM``` will return ```MODE_URL```\n-------------------------\nYou can also use multiple types\n```java\nautoLinkTextView.addAutoLinkMode(\n                AutoLinkMode.MODE_HASHTAG,\n                AutoLinkMode.MODE_PHONE,\n                AutoLinkMode.MODE_URL,\n                AutoLinkMode.MODE_MENTION,\n                AutoLinkMode.MODE_CUSTOM);\n```\n![](screens/screen1.png)\n-------------------------\nYou can also change text color for autoLink mode\n```java\nautoLinkTextView.setHashtagModeColor(ContextCompat.getColor(this, R.color.yourColor));\nautoLinkTextView.setPhoneModeColor(ContextCompat.getColor(this, R.color.yourColor));\nautoLinkTextView.setCustomModeColor(ContextCompat.getColor(this, R.color.yourColor));\nautoLinkTextView.setUrlModeColor(ContextCompat.getColor(this, R.color.yourColor));\nautoLinkTextView.setMentionModeColor(ContextCompat.getColor(this, R.color.yourColor));\nautoLinkTextView.setEmailModeColor(ContextCompat.getColor(this, R.color.yourColor));\n```\n-------------------------\nAnd also autoLink text pressed state color\n```java\nautoLinkTextView.setSelectedStateColor(ContextCompat.getColor(this, R.color.yourColor));\n```\n-------------------------\n\nSet modes that should be bold\n\n```java\nautoLinkTextView.setBoldAutoLinkModes(\n  AutoLinkMode.MODE_HASHTAG,\n  AutoLinkMode.MODE_PHONE,\n  AutoLinkMode.MODE_URL,\n  AutoLinkMode.MODE_EMAIL,\n  AutoLinkMode.MODE_MENTION\n);\n```\n\n-------------------------\n#### Enable under line\n\n```java\nautoLinkTextView.enableUnderLine();\n```\n\n![](screens/screen8.png)\n-------------------------\n\n### Contact :book:\n\n:arrow_forward:  **Email**: chatikyana@gmail.com\n\n:arrow_forward:  **Medium**: https://medium.com/@chatikyan\n\n:arrow_forward:  **Twitter**: https://twitter.com/ArmanChatikyan\n\n:arrow_forward:  **Google+**: https://plus.google.com/+ArmanChatikyan\n\n:arrow_forward:  **Website**: https://armcha.github.io/\n\nLicense\n--------\n\n\n      Auto Link TextView library for Android\n      Copyright (c) 2018 Arman Chatikyan (https://github.com/armcha/AutoLinkTextView).\n\n      Licensed under the Apache License, Version 2.0 (the \"License\");\n      you may not use this file except in compliance with the License.\n      You may obtain a copy of the License at\n\n         http://www.apache.org/licenses/LICENSE-2.0\n\n      Unless required by applicable law or agreed to in writing, software\n      distributed under the License is distributed on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n      See the License for the specific language governing permissions and\n      limitations under the License.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmcha%2Fautolinktextview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmcha%2Fautolinktextview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmcha%2Fautolinktextview/lists"}