{"id":22449890,"url":"https://github.com/turskyi/simplelistchoice","last_synced_at":"2026-05-03T19:32:56.598Z","repository":{"id":133704433,"uuid":"334652286","full_name":"Turskyi/SimpleListChoice","owner":"Turskyi","description":"SimpleListChoice is an educational project that demonstrates how to implement a list view for single and multiple selections using checkboxes in an Android application. Developers can explore the code to understand the implementation and potentially use similar functionality in their own projects.","archived":false,"fork":false,"pushed_at":"2024-07-26T22:11:35.000Z","size":1297,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T12:16:26.279Z","etag":null,"topics":["android-development","checkboxes","code-example","educational-project","kotlin","listview","monolith","user-interface"],"latest_commit_sha":null,"homepage":"https://github.com/Turskyi/SimpleListChoice","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/Turskyi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-31T12:41:40.000Z","updated_at":"2024-07-26T22:11:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"669f5ce5-733a-4816-a7b1-d4b80cc95bce","html_url":"https://github.com/Turskyi/SimpleListChoice","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Turskyi/SimpleListChoice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turskyi%2FSimpleListChoice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turskyi%2FSimpleListChoice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turskyi%2FSimpleListChoice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turskyi%2FSimpleListChoice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Turskyi","download_url":"https://codeload.github.com/Turskyi/SimpleListChoice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turskyi%2FSimpleListChoice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android-development","checkboxes","code-example","educational-project","kotlin","listview","monolith","user-interface"],"created_at":"2024-12-06T05:12:22.830Z","updated_at":"2026-05-03T19:32:56.579Z","avatar_url":"https://github.com/Turskyi.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)\n\u003cimg alt=\"GitHub commit activity\" src=\"https://img.shields.io/github/commit-activity/m/Turskyi/SimpleListChoice\"\u003e\n\n# SimpleListChoice\n\n## Description\n\nSimpleListChoice is an educational project that provides an example of how to\nimplement a list view for single and multiple selections using checkboxes in\nan Android application. Developers can explore the code to understand the\nimplementation and potentially use similar functionality in their own projects.\n\n## Installation\n\n1. Clone the repository\n2. Open the project in Android Studio\n3. Run the project on an emulator or a physical Android device\n\n## Purpose\n\nThe main purpose of this project is to demonstrate how to implement list views\nwith single and multiple selections using checkboxes. It is intended for\neducational purposes and as a reference for developers looking to implement\nsimilar functionality in their projects.\n\n## Technologies\n\n- [Android](https://developer.android.com/studio/intro)\n- [Kotlin](https://kotlinlang.org/)\n- [Monolithic Architecture](https://en.wikipedia.org/wiki/Monolithic_application)\n\n## Usage\n\n1. Run the application on an Android device\n2. Click on checkboxes to select items\n3. Retrieve data from selected items using the provided code example\n\n## Code Example\n\n```kotlin\nclass MainActivity : AppCompatActivity(), View.OnClickListener {\n\n  companion object {\n    const val LOG_TAG = \"myLogs\"\n  }\n\n  private lateinit var lvMain: ListView\n  private lateinit var names: Array\u003cString\u003e\n\n  /** Called when the activity is first created.  */\n  override fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n    setContentView(R.layout.activity_main)\n    lvMain = findViewById\u003cView\u003e(R.id.lv_main) as ListView\n    /** Setting the mode for selecting list items. */\n\n    /** For multiple choice. */\n    lvMain.choiceMode = ListView.CHOICE_MODE_MULTIPLE\n\n    val adapter = ArrayAdapter.createFromResource(\n      this, R.array.names,\n      android.R.layout.simple_list_item_multiple_choice\n    )\n\n    lvMain.adapter = adapter\n    val btnChecked: Button = findViewById\u003cView\u003e(R.id.btn_checked) as Button\n    btnChecked.setOnClickListener(this)\n\n    /** getting array from a resource file */\n    names = resources.getStringArray(R.array.names)\n  }\n\n  override fun onClick(arg0: View?) {\n    /** Writing the selected items to the log. */\n\n    /** For multiple choice. */\n    Log.d(LOG_TAG, \"checked: \")\n    val sbArray: SparseBooleanArray = lvMain.checkedItemPositions\n    val checkedItems: MutableList\u003cString\u003e = mutableListOf()\n    for (i in 0 until sbArray.size()) {\n      val key = sbArray.keyAt(i)\n      if (sbArray[key]) {\n        Log.d(LOG_TAG, names[key])\n        checkedItems.add(names[key])\n      }\n    }\n    Toast.makeText(this, \"checked: $checkedItems\", Toast.LENGTH_SHORT)\n      .show()\n  }\n}\n```\n\n## Contributing\n\n- You can create an issue or pull request with changes to the master branch\n- Contributions are welcome but not necessary, given the educational nature of\n  the project\n\n## License\n\nThis project does not have an intentional license specified.\n\n## Screenshot:\n\n\u003c!--suppress CheckImageSize --\u003e\n\u003cimg src=\"screenshots/Main_Screenshot_20240724.png\" width=\"200\"  alt=\"screenshot\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturskyi%2Fsimplelistchoice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturskyi%2Fsimplelistchoice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturskyi%2Fsimplelistchoice/lists"}