{"id":13644396,"url":"https://github.com/lawloretienne/Trestle","last_synced_at":"2025-04-21T07:31:11.270Z","repository":{"id":32999325,"uuid":"36630130","full_name":"lawloretienne/Trestle","owner":"lawloretienne","description":"A framework used to bridge one or more spans for use with a TextView","archived":false,"fork":false,"pushed_at":"2020-09-02T05:30:41.000Z","size":1711,"stargazers_count":569,"open_issues_count":2,"forks_count":50,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-05T01:07:21.355Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"anders94/blockchain-demo","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lawloretienne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-06-01T01:14:45.000Z","updated_at":"2025-03-27T19:39:35.000Z","dependencies_parsed_at":"2022-09-26T21:41:03.543Z","dependency_job_id":null,"html_url":"https://github.com/lawloretienne/Trestle","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/lawloretienne%2FTrestle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawloretienne%2FTrestle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawloretienne%2FTrestle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lawloretienne%2FTrestle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lawloretienne","download_url":"https://codeload.github.com/lawloretienne/Trestle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014621,"owners_count":21360983,"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-08-02T01:02:02.797Z","updated_at":"2025-04-21T07:31:06.254Z","avatar_url":"https://github.com/lawloretienne.png","language":"Java","funding_links":[],"categories":["TextView","Java"],"sub_categories":[],"readme":"# Trestle [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Trestle-green.svg?style=flat)](https://android-arsenal.com/details/1/1916) \u003ca href=\"http://www.methodscount.com/?lib=com.github.lawloretienne%3Atrestle%3A0.0.7\"\u003e\u003cimg src=\"https://img.shields.io/badge/Methods and size-112 | 10 KB-e91e63.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n![Trestle](https://raw.githubusercontent.com/lawloretienne/Trestle/master/images/ic_launcher.png)\n\n## Overview\n\nA framework used to bridge one or more spans for use with a TextView\n\nSupports the following spans :\n\n`ForegroundColorSpan`\n`BackgroundColorSpan`\n`CustomTypefaceSpan`\n`RelativeSizeSpan`\n`AbsoluteSizeSpan`\n`URLSpan`\n`UnderlineSpan`\n`StrikethroughSpan`\n`QuoteSpan`\n`SubscriptSpan`\n`SuperscriptSpan`\n`ClickableSpan`\n`ScaleXSpan`\n\nAlso supports one or more spans, spanning the length of a regex match\n\n## Screenshots\n\n![Trestle](https://raw.githubusercontent.com/lawloretienne/Trestle/master/images/Trestle_Screenshot_3.png)\n\n## Setup\n\n#### Gradle\n\n`compile 'com.github.lawloretienne:trestle:0.0.10'`\n\n#### Maven\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.lawloretienne\u003c/groupId\u003e\n    \u003cartifactId\u003etrestle\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.10\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Sample Usage\n\n```java\n// Setup single span\nTextView tv1 = (TextView) view.findViewById(R.id.tv1);\n\nCharSequence formattedText1 = Trestle.getFormattedText(\n        new Span.Builder(\"ForegroundSpan, BackgroundSpan, and CustomTypefaceSpan\")\n                .foregroundColor(getContext(), R.color.purple_100)\n                .backgroundColor(getContext(), R.color.green_500)\n                .typeface(italicFont)\n                .build());\n\ntv1.setText(formattedText1);\n\n// Setup multiple spans\nTextView tv2 = (TextView) view.findViewById(R.id.tv2);\n\nList\u003cSpan\u003e spans1 = new ArrayList\u003c\u003e();\nspans1.add(new Span.Builder(\"ForegroundSpan\")\n        .foregroundColor(getContext(), R.color.red_500)\n        .build());\nspans1.add(new Span.Builder(\"BackgroundSpan\")\n        .backgroundColor(getContext(), R.color.yellow_500) \n        .build());\nspans1.add(new Span.Builder(\"ForegroundSpan and BackgroundSpan\")\n        .foregroundColor(getContext(), R.color.blue_500)\n        .backgroundColor(getContext(), R.color.blue_300)\n        .build());\nspans1.add(new Span.Builder(\"ForegroundSpan, BackgroundSpan, and CustomTypefaceSpan\")\n        .foregroundColor(getContext(), R.color.yellow_500)\n        .backgroundColor(getContext(), R.color.indigo_200) \n        .typeface(regularFont)\n        .build());\n\nCharSequence formattedText2 = Trestle.getFormattedText(spans1);\n\ntv2.setText(formattedText2);\n```\n\n## Developed By\n\n* Etienne Lawlor \n \n\u0026nbsp;\u0026nbsp;\u0026nbsp;**Email** - lawloretienne@gmail.com\n\n\u0026nbsp;\u0026nbsp;\u0026nbsp;**Website** - https://medium.com/@etiennelawlor\n\n## Projects/Apps using Trestle\n\n- \u003ca href=\"https://play.google.com/store/apps/details?id=com.getsomeheadspace.android\"\u003eHeadspace\u003c/a\u003e\n- \u003ca href=\"https://play.google.com/store/apps/details?id=com.biggu.shopsavvy\u0026hl=en\"\u003eShopSavvy\u003c/a\u003e\n\nFeel free to contact me to add yours to this list.\n\n## License\n\n```\nCopyright 2015 Etienne Lawlor\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawloretienne%2FTrestle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flawloretienne%2FTrestle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flawloretienne%2FTrestle/lists"}