{"id":21957594,"url":"https://github.com/sephiroth74/tri-state-checkbox","last_synced_at":"2025-08-09T19:22:12.711Z","repository":{"id":49581200,"uuid":"165753111","full_name":"sephiroth74/Tri-State-Checkbox","owner":"sephiroth74","description":"3 State Checkbox for android in pure Material Style","archived":false,"fork":false,"pushed_at":"2021-06-13T14:46:18.000Z","size":508,"stargazers_count":59,"open_issues_count":4,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T01:23:40.892Z","etag":null,"topics":["android","android-library","android-ui","animation","checkbox","checkbox-component","material-design"],"latest_commit_sha":null,"homepage":null,"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/sephiroth74.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}},"created_at":"2019-01-14T23:46:09.000Z","updated_at":"2023-11-13T22:25:21.000Z","dependencies_parsed_at":"2022-09-21T16:51:12.343Z","dependency_job_id":null,"html_url":"https://github.com/sephiroth74/Tri-State-Checkbox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2FTri-State-Checkbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2FTri-State-Checkbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2FTri-State-Checkbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2FTri-State-Checkbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sephiroth74","download_url":"https://codeload.github.com/sephiroth74/Tri-State-Checkbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250468270,"owners_count":21435452,"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-library","android-ui","animation","checkbox","checkbox-component","material-design"],"created_at":"2024-11-29T08:54:43.691Z","updated_at":"2025-04-23T16:11:12.367Z","avatar_url":"https://github.com/sephiroth74.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animated Tri State Checkbox\n3 State Checkbox for **Android** in pure Material Style, with animation between the states.\n\n[![](https://jitpack.io/v/sephiroth74/Tri-State-Checkbox.svg)](https://jitpack.io/#sephiroth74/Tri-State-Checkbox)\n\n\n\u003cimg src=\"./art/checkbox.gif\" width=\"360\" height=\"740\" /\u003e\n\n# Usage\n\nIn your layout:\n\n    \u003cit.sephiroth.android.library.checkbox3state.CheckBox3\n        android:id=\"@+id/checkBox1\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:checked=\"true\"\n        app:sephiroth_checkbox3_indeterminate=\"true\"\n        android:text=\"Select All\"\n        app:layout_constraintStart_toStartOf=\"parent\"\n        app:layout_constraintTop_toBottomOf=\"@+id/textView1\"\n        app:sephiroth_checkbox3_checkableCycle=\"@array/sephiroth_checkbox3_cycleIndeterminate\"\n             /\u003e\n\n\nIn Kotlin:\n\n    // set both the checked and indeterminate state\n    checkbox.setChecked(true, true)\n\n    // set the indeterminate state only\n    checkBox.isIndeterminate = false\n\n\n## Cycles:\n\nChange the cycle used to determine the next state of the checkbox when the user click the component, or when the **toggle()** method is called.\u003cbr /\u003e\nThe value passed is an array of 4 integer elements, representing the state of the checkbox.\u003cbr /\u003e\nThe value of each element can be 0 or 1, with 0 to disable the state and 1 to enable the state.\u003cbr /\u003e\nThe states are (in order):\n\n- Checked\n- Indeterminate (checked)\n- Unchecked\n- Indeterminate (unchecked)\n     \nSo if a cycle like this one is used:\n\n    int[] cycle = new int[]{1,0,1,0}\n\nthe checkbox will only cycle between checked and unchecked state.\u003cbr /\u003e\n\nThe method throws an exception if the array is not valid.\u003cbr /\u003e\nA valid array must match the following rules:\n- If not null, must have 4 elements\n- At least 2 elements must be equal to 1\n\nIn Kotlin:\n    \n    checkBox1.setCycle(intArrayOf(1, 0, 1, 0))\n\nIn xml layout:\n\n    app:sephiroth_checkbox3_checkableCycle=\"@array/sephiroth_checkbox3_cycleCheckedUncheckedOnly\"\n\n# Installation\n\n## Maven\n\n    implementation 'it.sephiroth.android.library:tri-state-checkbox:{version}'\n\n\n## JitPack\n\n**Step 1.** Add the JitPack repository to your build file:\n\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n\n**Step 2.** Add the dependency\n\n\tdependencies {\n\t        implementation 'com.github.sephiroth74:AndroidUIGestureRecognizer:Tag'\n\t}\n\nGet the latest version  on [JitPack](https://jitpack.io/#sephiroth74/Tri-State-Checkbox)\n\n\n# License\n\nMIT License\n\nCopyright (c) 2019 Alessandro Crugnola\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsephiroth74%2Ftri-state-checkbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsephiroth74%2Ftri-state-checkbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsephiroth74%2Ftri-state-checkbox/lists"}