{"id":20371325,"url":"https://github.com/nikitagordia/cosin","last_synced_at":"2025-05-07T04:09:50.713Z","repository":{"id":91182167,"uuid":"130464628","full_name":"NikitaGordia/Cosin","owner":"NikitaGordia","description":"Android loading view library 📊🍭","archived":false,"fork":false,"pushed_at":"2018-05-26T07:58:00.000Z","size":3218,"stargazers_count":124,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T04:09:38.156Z","etag":null,"topics":["android","android-indicator","animation","animation-indicator","calculations","cosinus","customview","gradle","graphics","highlight","indicator","jitpack","loading","tutorial","view","waitingpage"],"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/NikitaGordia.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":"2018-04-21T10:47:39.000Z","updated_at":"2024-06-27T13:03:21.000Z","dependencies_parsed_at":"2023-06-09T00:45:36.044Z","dependency_job_id":null,"html_url":"https://github.com/NikitaGordia/Cosin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikitaGordia%2FCosin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikitaGordia%2FCosin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikitaGordia%2FCosin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikitaGordia%2FCosin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NikitaGordia","download_url":"https://codeload.github.com/NikitaGordia/Cosin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"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-indicator","animation","animation-indicator","calculations","cosinus","customview","gradle","graphics","highlight","indicator","jitpack","loading","tutorial","view","waitingpage"],"created_at":"2024-11-15T01:07:27.385Z","updated_at":"2025-05-07T04:09:50.688Z","avatar_url":"https://github.com/NikitaGordia.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ch2 align=\"center\"\"\u003e\u003cb\u003e\u003cfont size=\"36\"\u003eCOSIN\u003c/font\u003e\u003c/b\u003e\u003c/h2\u003e\n\t\u003ch4 align=\"center\"\u003eLoading android view lib\u003c/h4\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"github/main.png\"/\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"github/1.png\" width=\"250\" height=\"443\"  /\u003e\n\t\u003cimg src=\"github/2.png\" width=\"250\" height=\"443\" /\u003e\n\t\u003cimg src=\"github/3.png\" width=\"250\" height=\"443\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"github/4.png\" width=\"250\" height=\"443\"  /\u003e\n\t\u003cimg src=\"github/5.png\" width=\"250\" height=\"443\" /\u003e\n\t\u003cimg src=\"github/6.png\" width=\"250\" height=\"443\" /\u003e\n\u003c/p\u003e\n\n# Gradle :\n\nbuild.gradle (Project)\n```groovy\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nbuild.gradle (Module)\n```groovy\nimplementation 'com.github.NikitaGordia:Cosin:1.1.0'\n```\n\n# Quick start guide\n\n## Declaration\n\n```xml\n\u003ccom.nikitagordia.cosin.Cosin\n        android:layout_width=\"170dp\"\n        android:layout_height=\"140dp\" /\u003e\n```\n\n## Properties\n\n| Property    \t\t\t\t\t\t    | Description   \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t        |\n| --------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| speed     \t\t\t\t\t\t\t| Angle speed\t\t  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| isLoading    \t\t\t\t\t\t\t| If 'true' shows symbols on rectangle\t\t  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| setEnd    \t\t\t\t\t\t\t| Shows end animation (optionally you may pass onEnd(OnEnd))\n| rectWidth    \t\t\t\t\t\t\t| Width each of rectangle \t\t\t\t\t  \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| period    \t\t\t\t\t\t\t| Determine period of cosinusoidal function\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| colorAdapter    \t\t\t\t\t\t| Define color changes by two parameters (position count, height percent) for each rectagle\t\t\t\t\t|\n| offset    \t\t\t\t\t\t\t| Moving bottom offset\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| directionRight    \t\t\t\t\t| Determine movement side\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n| textAdapter    \t\t\t\t\t\t| Define text changes by position count for each rectangle\t\t\t\t\t\t\t\t\t\t\t\t\t|\n\n## There are 6 default ColorAdapter implementation in box :\n\n* DefaultColorAdapterGB (Green -\u003e Blue)\n* ColorAdapterBG (Blue -\u003e Green)\n* ColorAdapterBR (Blue -\u003e Red)\n* ColorAdapterGR (Green -\u003e Blue)\n* ColorAdapterRB (Red -\u003e Blue)\n* ColorAdapterRG (Red -\u003e Green)\n* ColorAdapterBG (Blue -\u003e Green)\n\n\n## There are 2 default TextAdapter implementation in box :\n\n* DefaultBinaryTextAdapter (shows random [0, 1] symbols in each rectagle)\n* WordTextAdapter (shows specified cycle String)\n\n\n#### ColorAdapter overriding example :\n```java\npublic class ColorAdapterBR implements Cosin.ColorAdapter {\n\n    @Override\n    public int getBackgroundColor() {\n        return Color.TRANSPARENT;\n    }\n\n    @Override\n    public int calcColor(int numOfRect, double percentOfHeight) {\n        return Color.argb(150, (int)(255 * (1d - percentOfHeight)), 0, (int)(255 * percentOfHeight));\n    }\n}\n```\n\n#### TextAdapter overriding example :\n```java\npublic class WordTextAdapter implements Cosin.TextAdapter {\n\n    private String word;\n\n    public WordTextAdapter(String word) {\n        this.word = word;\n    }\n\n    @Override\n    public char getString(int numOfRect) {\n        if (word.isEmpty()) return ' ';\n        return word.charAt(numOfRect % word.length());\n    }\n}\n```\n\n#### A bit more gifs\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"github/1.gif\" width=\"200\" height=\"355\"  /\u003e\n\t\u003cimg src=\"github/2.gif\" width=\"200\" height=\"355\" /\u003e\n\t\u003cimg src=\"github/3.gif\" width=\"200\" height=\"355\" /\u003e\n\t\u003cimg src=\"github/4.gif\" width=\"200\" height=\"355\" /\u003e\n\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikitagordia%2Fcosin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikitagordia%2Fcosin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikitagordia%2Fcosin/lists"}