{"id":18269738,"url":"https://github.com/skyfe79/hashgirl","last_synced_at":"2025-06-27T13:35:52.209Z","repository":{"id":137746307,"uuid":"65468351","full_name":"skyfe79/HashGirl","owner":"skyfe79","description":"HashGirl is a simple library to make a linkable string for Android.","archived":false,"fork":false,"pushed_at":"2016-08-12T12:47:26.000Z","size":583,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T23:35:03.735Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyfe79.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-11T12:40:52.000Z","updated_at":"2021-03-17T18:15:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"a18c4541-f703-425f-8a0f-196726506c2a","html_url":"https://github.com/skyfe79/HashGirl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skyfe79/HashGirl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FHashGirl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FHashGirl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FHashGirl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FHashGirl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyfe79","download_url":"https://codeload.github.com/skyfe79/HashGirl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FHashGirl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262265858,"owners_count":23284583,"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-11-05T11:37:00.314Z","updated_at":"2025-06-27T13:35:52.177Z","avatar_url":"https://github.com/skyfe79.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# #HashGirl\n\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![API](https://img.shields.io/badge/API-7%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=7)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](http://opensource.org/licenses/MIT)\n\nHashGirl is a simple library to make a linkable string for Android. HashGirl can make hash a string which contains spaces. You can set the regular expression to grab a link and also you can set the character to indicate the end of the link.\n\n![](art/hashgirl.gif)\n\nHashGirl uses method chain to make linkable string like below:\n\n```java\nString text = \"Hello, I'm #Super Hash Girl^ in the World. You can hash #every^thing what you want. #I will hash you^\";\n\nTextView afterTextView = (TextView)findViewById(R.id.afterTextView);\nHashGirl\n        .with(text)\n        .grab(\"(#((\\\\w+ *)*)\\\\^)\", \"^\", \"#\")\n        .underline()\n        .color(Color.BLUE)\n        .bgcolor(Color.WHITE)\n        .click(new OnClickHashListener() {\n            @Override\n            public void onClickHash(String hash) {\n                Toast.makeText(MainActivity.this, hash, Toast.LENGTH_SHORT).show();\n            }\n        })\n        .into(afterTextView);\n```\n\n## Setup Gradle\n\n```gradle\ndependencies {\n    ...\n    compile 'kr.pe.burt.android.lib:hashgirl:1.0.3'\n}\n```\n\n## HashGirl's methods\n\n* with(String text)\n\t* is static method to set the text data.\n\t* You should start HashGirl from this 'with' method.\n* grab(String regExp)\n* grab(String regExp, String postfixToRemove = \"\", String prefixToRemove = \"\")\n\t* set regular expression to grab linkable string\n\t* set postfixToRemove or prefixToRemove to remove indicator of the start or end of the linked string.\n* underline()\n\t* to underline linked string\n* strike()\n\t* to strike line through the string   \n* color(int color)\n\t* set foreground color of the linked string\n* bgcolor(int color)\n\t* set background color of the linked string\n* alpha(int alpha)\n\t* set alpha of the linked string\n* click(OnClickHashListener onClickHashListener)\n\t* set a handler to process the click action of the linked string\n* into(TextView textVieW)\n\t* set a TextView to set the result.   \n\n## Examples\n\n```java\nString text = \"Hello, I'm #Super Hash Girl^ in the World. You can hash #every^thing what you want. #I will hash you^\";\n\nTextView before = (TextView)findViewById(R.id.before);\nbefore.setText(text);\n\nTextView after1 = (TextView)findViewById(R.id.after1);\nHashGirl\n    .with(text)\n    .grab(\"(#((\\\\w+ *)*)\\\\^)\", \"^\")\n    .click(new OnClickHashListener() {\n        @Override\n        public void onClickHash(String hash) {\n            Toast.makeText(MainActivity.this, hash, Toast.LENGTH_SHORT).show();\n        }\n    })\n    .into(after1);\n\nTextView after2 = (TextView)findViewById(R.id.after2);\nHashGirl\n        .with(text)\n        .grab(\"(#((\\\\w+ *)*)\\\\^)\", \"^\", \"#\")\n        .underline()\n        .color(Color.BLUE)\n        .bgcolor(Color.WHITE)\n        .click(new OnClickHashListener() {\n            @Override\n            public void onClickHash(String hash) {\n                Toast.makeText(MainActivity.this, hash, Toast.LENGTH_SHORT).show();\n            }\n        })\n        .into(after2);\n```\n\n## MIT License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Sungcheol Kim, [https://github.com/skyfe79/HashGirl](https://github.com/skyfe79/HashGirl)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fhashgirl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyfe79%2Fhashgirl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fhashgirl/lists"}