{"id":17643808,"url":"https://github.com/vanniktech/textbuilder","last_synced_at":"2025-07-28T15:11:33.467Z","repository":{"id":37412794,"uuid":"79958624","full_name":"vanniktech/TextBuilder","owner":"vanniktech","description":"Provides a Class with a builder pattern for building beautiful text super easily. Internally it uses the Spannable API.","archived":false,"fork":false,"pushed_at":"2025-06-24T20:44:44.000Z","size":828,"stargazers_count":18,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-24T21:41:22.441Z","etag":null,"topics":["android","color","formatting","text","textview"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanniktech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/funding.yml","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,"zenodo":null},"funding":{"github":["vanniktech"]}},"created_at":"2017-01-24T21:57:52.000Z","updated_at":"2025-06-16T09:04:46.000Z","dependencies_parsed_at":"2024-01-03T10:28:40.295Z","dependency_job_id":"0d6c5bf7-fdb0-4ef6-8a8c-2e5915139ae0","html_url":"https://github.com/vanniktech/TextBuilder","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/vanniktech/TextBuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2FTextBuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2FTextBuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2FTextBuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2FTextBuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanniktech","download_url":"https://codeload.github.com/vanniktech/TextBuilder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2FTextBuilder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267535898,"owners_count":24103390,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","color","formatting","text","textview"],"created_at":"2024-10-23T09:42:57.001Z","updated_at":"2025-07-28T15:11:33.434Z","avatar_url":"https://github.com/vanniktech.png","language":"Java","funding_links":["https://github.com/sponsors/vanniktech"],"categories":[],"sub_categories":[],"readme":"TextBuilder\n===========\n\nProvides a Class with a builder pattern for building beautiful text super easily. Internally it uses the Spannable API.\n\n```java\nnew TextBuilder(this) // Context\n    .addText(R.string.some_text)\n    .addWhiteSpace()\n    .addColoredTextRes(\"in green\", R.color.green)\n    .addWhiteSpace()\n    .addColoredText(\"and blue\", Color.BLUE)\n    .addWhiteSpace()\n    .into(textView);\n```\n\nAlso certain parts of a text can be formatted:\n\n```java\nnew TextBuilder(this) // Context\n    .addFormableText(\"Terms of use and privacy terms\")\n    .format(\"Terms of use\")\n      .textColor(Color.RED)\n      .italic()\n      .bold()\n      .clickable(() -\u003e Log.d(TAG, \"Clicked on Terms of Use\"))\n    .done()\n    .format(\"privacy terms\")\n      .underline()\n      .bold()\n      .clickable(() -\u003e Log.d(TAG, \"Clicked on Privacy Terms\"))\n    .done()\n    .into(textView);\n```\n\nDisplaying images is also not a problem:\n\n```java\nnew TextBuilder(this)\n    .addDrawable(R.drawable.ic_done_black_18dp)\n    .addWhiteSpace()\n    .addText(\"Shopping\")\n    .addNewLine()\n    .addText(\"Cleaning\")\n    .into(textView);\n```\n\nFor now only the basic things are supported and some features may be lacking. I'm open for any suggestions or new APIs.\n\n# Setup\n\n**build.gradle**\n\n```groovy\ncompile 'com.vanniktech:textbuilder:0.4.0'\ncompile 'com.vanniktech:textbuilder:0.5.0-SNAPSHOT'\n```\n\nModules are located on [Maven Central](https://oss.sonatype.org/#nexus-search;quick~textbuilder).\n\n# Proguard\n\nNo configuration needed.\n\n# License\n\nCopyright (C) 2017 Vanniktech - Niklas Baudy\n\nLicensed under the Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanniktech%2Ftextbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanniktech%2Ftextbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanniktech%2Ftextbuilder/lists"}