{"id":19508705,"url":"https://github.com/commit451/baselinegridtextview","last_synced_at":"2025-07-28T17:07:28.555Z","repository":{"id":83213965,"uuid":"54164983","full_name":"Commit451/BaselineGridTextView","owner":"Commit451","description":"An extension to AppCompatTextView which aligns text to a 4dp baseline grid.","archived":false,"fork":false,"pushed_at":"2022-06-27T04:36:23.000Z","size":102,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T02:52:40.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Commit451.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2016-03-18T02:01:35.000Z","updated_at":"2022-06-27T04:36:26.000Z","dependencies_parsed_at":"2023-03-01T21:00:37.538Z","dependency_job_id":null,"html_url":"https://github.com/Commit451/BaselineGridTextView","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Commit451/BaselineGridTextView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FBaselineGridTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FBaselineGridTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FBaselineGridTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FBaselineGridTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Commit451","download_url":"https://codeload.github.com/Commit451/BaselineGridTextView/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commit451%2FBaselineGridTextView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267552097,"owners_count":24106000,"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":[],"created_at":"2024-11-10T23:09:11.735Z","updated_at":"2025-07-28T17:07:28.510Z","avatar_url":"https://github.com/Commit451.png","language":"Java","readme":"# BaselineGridTextView\nAn extension to `AppCompatTextView` which aligns text to a 4dp baseline grid.\nOriginal code taken from [Plaid](https://github.com/nickbutcher/plaid). Thanks to [@nickbutcher](https://github.com/nickbutcher)\n\n[![Build Status](https://travis-ci.org/Commit451/BaselineGridTextView.svg?branch=master)](https://travis-ci.org/Commit451/BaselineGridTextView) [![](https://jitpack.io/v/Commit451/BaselineGridTextView.svg)](https://jitpack.io/#Commit451/BaselineGridTextView)\n\n# Usage\nUsage is controlled through XML or programatically. Within XML:\n\n```xml\n\u003ccom.commit451.baselinegridtextview.BaselineGridTextView\n  android:layout_width=\"match_parent\"\n  android:layout_height=\"wrap_content\"\n  android:text=\"hello world\"\n  app:lineHeightHint=\"24dp\"\u003e\n```\n`lineHeightHint` is the desired line height, and should be a multiple of 4 to insure a 4dp rhythm. Alternately, you can use the attribute:\n```xml\napp:lineHeightMultiplierHint=\"1.2\"\n```\nwhich will take your set text size and multiply it by the value specified.\n\nor programatically:\n```java\nint size = getResources().getDimensionPixelSize(R.dimen.textsize);\ntextView.setLineHeightHint(size);\n```\n\n# Testing\nWe highly recommend the app [Keyline Pushing](https://play.google.com/store/apps/details?id=com.faizmalkani.keylines) for testing.\n\nLicense\n--------\n\n    Copyright 2016 Commit 451\n    Copyright 2015 Google, Inc.\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommit451%2Fbaselinegridtextview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommit451%2Fbaselinegridtextview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommit451%2Fbaselinegridtextview/lists"}