{"id":13428783,"url":"https://github.com/ZieIony/GuideToCustomViews","last_synced_at":"2025-03-16T01:33:30.885Z","repository":{"id":47064565,"uuid":"216523700","full_name":"ZieIony/GuideToCustomViews","owner":"ZieIony","description":"The ultimate guide to Android custom views","archived":false,"fork":false,"pushed_at":"2021-09-15T04:59:40.000Z","size":404,"stargazers_count":754,"open_issues_count":0,"forks_count":55,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-10-12T14:13:55.272Z","etag":null,"topics":["android","android-ui","material-design"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZieIony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-21T09:03:13.000Z","updated_at":"2024-10-04T11:49:39.000Z","dependencies_parsed_at":"2022-09-23T11:02:24.854Z","dependency_job_id":null,"html_url":"https://github.com/ZieIony/GuideToCustomViews","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/ZieIony%2FGuideToCustomViews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZieIony%2FGuideToCustomViews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZieIony%2FGuideToCustomViews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZieIony%2FGuideToCustomViews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZieIony","download_url":"https://codeload.github.com/ZieIony/GuideToCustomViews/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814905,"owners_count":20352037,"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","android-ui","material-design"],"created_at":"2024-07-31T01:01:05.040Z","updated_at":"2025-03-16T01:33:30.860Z","avatar_url":"https://github.com/ZieIony.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# GuideToCustomViews\nThe ultimate guide to Android custom views\n\nI've been designing, writing and publishing Android custom views for the past 5 years now. I guess it's about time to sum it up and share the results.\n\nHere you will find the topics related to custom views and a couple of case studies. Code samples will be in Java and Kotlin randomly and the code will be as simple as possible to demonstrate ideas and techniques better. I want this place to be more of a tutorial wiki than a documentation. You can find the documentation on [developer.android.com/](https://developer.android.com/).\n\nI'll try to add an article or two per week. If there's something missing and you think that I should write about - raise an issue and tell me. If you wish, there's a larger repository with my custom views [here](https://github.com/ZieIony/Carbon).\n\n### Topics\n\n1. [Basics](https://github.com/ZieIony/GuideToCustomViews/wiki/Basics)\n1. [What to extend](https://github.com/ZieIony/GuideToCustomViews/wiki/What-to-extend)\n1. [Prefix everything](https://github.com/ZieIony/GuideToCustomViews/wiki/Prefix-everything)\n\n##### Code\n\n1. [Constructors](https://github.com/ZieIony/GuideToCustomViews/wiki/Constructors)\n1. [Measuring](https://github.com/ZieIony/GuideToCustomViews/wiki/Measuring)\n1. [Custom states](https://github.com/ZieIony/GuideToCustomViews/wiki/Custom-states)\n1. [State saving](https://github.com/ZieIony/GuideToCustomViews/wiki/State-saving)\n1. [Edit mode](https://github.com/ZieIony/GuideToCustomViews/wiki/Edit-mode)\n1. [Drawables](https://github.com/ZieIony/GuideToCustomViews/wiki/Drawables)\n\n##### Attributes and styles\n\n1. [Using attributes](https://github.com/ZieIony/GuideToCustomViews/wiki/Using-attributes)\n1. [Custom attributes](https://github.com/ZieIony/GuideToCustomViews/wiki/Custom-attributes)\n1. [Custom layout attributes](https://github.com/ZieIony/GuideToCustomViews/wiki/Custom-layout-attributes)\n\n##### Accessibility\n\n1. [Basic accessibility](https://github.com/ZieIony/GuideToCustomViews/wiki/Basic-accessibility)\n1. [Content description and events](https://github.com/ZieIony/GuideToCustomViews/wiki/Content-description-and-events)\n\n### Case studies\n\n##### ProgressTextView\n\n\u003cimg src=\"https://github.com/ZieIony/GuideToCustomViews/blob/master/progresstextview/result.png\" width=\"25%\" height=\"25%\"/\u003e\n\nA progress bar that also has a text. The text should be drawn in one color on the 'done' part of the progress and in another color on the 'remaining' part.\n\nSee: [guide](https://github.com/ZieIony/GuideToCustomViews/wiki/ProgressTextView), [code](https://github.com/ZieIony/GuideToCustomViews/tree/master/progresstextview).\n\n##### ChartView\n\n\u003cimg src=\"https://github.com/ZieIony/GuideToCustomViews/blob/master/images/chartview.png\" width=\"25%\" height=\"25%\"/\u003e\n\nA simple bar chart with color state lists and bar selecting with clicks.\n\nTopics covered: drawing on canvas, state lists, touch events.\n\nSee: [code](https://github.com/ZieIony/GuideToCustomViews/tree/master/chartview).\n\nA more complete version of the view can be found [here](https://github.com/ZieIony/Carbon/blob/master/carbon/src/main/java/carbon/beta/ChartView.java)\n\n##### FlowLayout\n\n\u003cimg src=\"https://github.com/ZieIony/GuideToCustomViews/blob/master/images/flowlayout.png\" width=\"25%\" height=\"25%\"/\u003e\n\nA layout that displays its children in rows, side to side and then in another line.\n\nTopics covered: measuring, laying out, custom layout attributes, right to left support.\n\nSee: [code](https://github.com/ZieIony/GuideToCustomViews/tree/master/flowlayout).\n\n##### InvalidEditText\n\nAn EditText with support for an invalid state attribute.\n\nTopics covered: custom states.\n\nSee: [guide](https://github.com/ZieIony/GuideToCustomViews/wiki/InvalidEditText), [code](https://github.com/ZieIony/GuideToCustomViews/tree/master/invalidedittext).\n\n##### MoodToggle\n\n\u003cimg src=\"https://github.com/ZieIony/GuideToCustomViews/blob/master/images/moodtoggle.png\" width=\"25%\" height=\"25%\"/\u003e\n\nA very simple toggle with accessibility support.\n\nTopics covered: basic accessibility.\n\nSee: [guide](https://github.com/ZieIony/GuideToCustomViews/wiki/MoodToggle), [code](https://github.com/ZieIony/GuideToCustomViews/tree/master/moodtoggle).\n\n##### LandscapeDrawable\n\n\u003cimg src=\"https://github.com/ZieIony/GuideToCustomViews/blob/master/images/landscapedrawable.png\" width=\"25%\" height=\"25%\"/\u003e\n\nAn animated Drawable depicting a landscape with customizable items: trees, clouds, stars, a sun, and fog.\n\nTopics covered: drawing on Canvas, custom drawables.\n\nSee: [guide](https://github.com/ZieIony/GuideToCustomViews/wiki/LandscapeDrawable), [code](https://github.com/ZieIony/GuideToCustomViews/tree/master/landscapedrawable).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZieIony%2FGuideToCustomViews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZieIony%2FGuideToCustomViews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZieIony%2FGuideToCustomViews/lists"}