{"id":21031851,"url":"https://github.com/zekunyan/linktextview","last_synced_at":"2025-05-15T12:31:21.276Z","repository":{"id":86192337,"uuid":"25868479","full_name":"zekunyan/LinkTextView","owner":"zekunyan","description":"An Android TextView to add highly customizable and colorful link.","archived":false,"fork":false,"pushed_at":"2015-02-17T16:15:03.000Z","size":473,"stargazers_count":29,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T09:05:20.685Z","etag":null,"topics":["android-textview","java","link"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zekunyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-28T12:36:11.000Z","updated_at":"2025-02-23T23:58:52.000Z","dependencies_parsed_at":"2023-03-13T08:56:07.737Z","dependency_job_id":null,"html_url":"https://github.com/zekunyan/LinkTextView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekunyan%2FLinkTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekunyan%2FLinkTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekunyan%2FLinkTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekunyan%2FLinkTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zekunyan","download_url":"https://codeload.github.com/zekunyan/LinkTextView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254341075,"owners_count":22054981,"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":["android-textview","java","link"],"created_at":"2024-11-19T12:33:00.128Z","updated_at":"2025-05-15T12:31:19.187Z","avatar_url":"https://github.com/zekunyan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LinkTextView\n\nLinkTextView is an Android TextView to add highly customizable and colorful links. \n\n## Features\n* Easy to add link and attach data.\n* Set link normal color and pressed color.\n* Set background normal color and pressed color.\n\n## Sample\nSee the [LinkTextViewSample](https://github.com/zekunyan/LinkTextView/tree/master/LinkTextViewSample) for a common use of this library.\n![image](Gif/LinkTextView_Sample.gif)\n\n## How to use\n\nDownload the [LinkTextView.java](https://github.com/zekunyan/LinkTextView/blob/master/LinkTextView/LinkTextView.java) file and copy it into your project.\n\nAdd LinkTextView to your layout.\n```xml\n\u003ccom.zekunyan.linktextview.LinkTextView\n    android:id=\"@+id/linkTextView\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"80dp\"\n    android:background=\"#DDDDDD\"\n    android:gravity=\"center\"\n    android:textColor=\"#000000\"\n    android:textSize=\"24sp\" /\u003e\n```\n\nGet the instance of LinkTextView.\n```java\nlinkTextView = (LinkTextView) findViewById(R.id.linkTextView);\n```\n\nSet text.\n```java\nlinkTextView.setClickableText(\"Example link.\");\n```\n\nAdd link with default color.\n```java\nint linkID = linkTextView.addClick(\n        linkBegin,                          //Link begin \n        linkEnd,                            //Link end\n        new LinkTextView.OnClickInLinkText() {\n    @Override    \n    public void onLinkTextClick(String clickText, int linkID, Object attachment) {\n        Log.i(LOG_TAG, \"You click manual link. It's attachment is: \" + attachment);\n    }\n}, \n    \"This is attachment.\"                  //Link attachment\n);\n```\n\nOr add link with custom color.\n```java\nint linkID = linkTextView.addClick(\n        linkBegin,                         //Link begin\n        linkEnd,                           //Link end\n        new LinkTextView.OnClickInLinkText() {\n    @Override\n    public void onLinkTextClick(String clickText, int linkID, Object attachment) {\n        Log.i(LOG_TAG, \"You click example link. It's attachment is: \" + attachment);\n    }\n},\n        \"This is example link attachment\", //Link attachment\n        true,                              //Show link underline\n        Color.BLACK,                       //Text normal color\n        Color.YELLOW,                      //Text pressed color\n        Color.WHITE,                       //Background normal color\n        Color.GREEN                        //Background pressed color\n);\n```\n\nYou can change specific Link's color by its ID.\n```java\nlinkTextView.setTextPressedColor(linkID, Color.RED);\n```\n\nYou can remove specific link by its ID.\n```java\nlinkTextView.removeLink(linkID);\n```\n\n## Doc\n[API Documentation](http://tutuge.me/LinkTextView/index.html).\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekunyan%2Flinktextview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzekunyan%2Flinktextview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekunyan%2Flinktextview/lists"}