{"id":13902474,"url":"https://github.com/zekierciyas/survey-compose","last_synced_at":"2025-07-18T00:31:36.171Z","repository":{"id":221754380,"uuid":"755282676","full_name":"zekierciyas/survey-compose","owner":"zekierciyas","description":"A Survey library of fully configurable, dynamic questions/answers and UI written in Jetpack Compose.","archived":false,"fork":false,"pushed_at":"2024-03-08T19:25:56.000Z","size":12203,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-07T22:34:00.670Z","etag":null,"topics":["android","android-survey","jetpack-compose","questionnaire","questionnaire-android","survey-jetpack-compose","survey-view"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/zekierciyas.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":"2024-02-09T20:01:09.000Z","updated_at":"2024-06-15T01:21:04.000Z","dependencies_parsed_at":"2024-03-08T20:37:42.100Z","dependency_job_id":"5ff2e11e-1327-4a19-a4f8-2190e2be981f","html_url":"https://github.com/zekierciyas/survey-compose","commit_stats":null,"previous_names":["zekierciyas/survey-compose"],"tags_count":1,"template":false,"template_full_name":"zekierciyas/android-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekierciyas%2Fsurvey-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekierciyas%2Fsurvey-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekierciyas%2Fsurvey-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekierciyas%2Fsurvey-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zekierciyas","download_url":"https://codeload.github.com/zekierciyas/survey-compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226310601,"owners_count":17604612,"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-survey","jetpack-compose","questionnaire","questionnaire-android","survey-jetpack-compose","survey-view"],"created_at":"2024-08-06T22:01:09.970Z","updated_at":"2024-11-25T10:32:09.991Z","avatar_url":"https://github.com/zekierciyas.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Survey View \n[![](https://jitpack.io/v/zekierciyas/survey-compose.svg)](https://jitpack.io/#zekierciyas/survey-compose)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-survey--compose-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/8480)\n\nAndroid library written in Jetpack Compose, containing a fully configurable survey/questionnaire screen.\n\n\u003cimg src=\"/previews/preview_video.gif\" align=\"center\" height=\"660\"/\u003e\n\n## Gradle\n\n**Step 1** : Add the JitPack repository to your build file\n\n```gradle\ndependencyResolutionManagement {\n\t\trepositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n\t\trepositories {\n\t\t\tmavenCentral()\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n```\n\n**Step 2** : Add the dependency\n\n\n```gradle\nimplementation 'com.github.zekierciyas:survey-compose:1.0.0'\n```\n\n## Usage\n\n\u003cimg src=\"/previews/preview_image.jpg\" align=\"right\" height=\"660\"/\u003e\n\n\n``` kotlin\n@Composable\nfun SurveyView() {\n\n    var showMessage by remember { mutableStateOf(false) }\n\n    val sampleSurvey = listOf(\n        SurveyModel(\n            questionType = QuestionType.MULTIPLE_CHOICE,\n            questionId = \"id1\",\n            questionTitle = \"1) Select your favorite color:\",\n            answers = listOf(\"Red\", \"Green\", \"Blue\"),\n            questionDescription = \"Description\"\n        ),\n        SurveyModel(\n            questionType = QuestionType.SINGLE_CHOICE,\n            questionId =\"id2\",\n            questionTitle =\"2) Choose your preferred programming language:\",\n            answers = listOf(\"Java\", \"Kotlin\", \"Swift\", \"Python\"),\n            questionDescription = \"Description\"\n        ),\n        SurveyModel(\n            questionType = QuestionType.TEXT,\n            questionId =\"id3\",\n            questionTitle =\"3) Choose your preferred programming language:\",\n            questionDescription = \"Description\"\n        )\n    )\n    SurveyScreen(\n        survey = sampleSurvey,\n        backgroundColor = Color.White,\n        singleOptionUI = SingleOptionUI(\n            questionTitle = SurveyText(\n                color = Color.DarkGray,\n                fontWeight = FontWeight.ExtraBold\n            ),\n            answer = SurveyText(\n                color = Color.DarkGray,\n                fontWeight = FontWeight.Medium\n            ),\n            selectedColor = Color.White,\n            unSelectedColor = Color.Gray,\n            borderColor = Color.Gray\n        ),\n        multipleOptionUI = MultipleOptionUI(\n            questionTitle = SurveyText(\n                color = Color.DarkGray,\n                fontWeight = FontWeight.ExtraBold\n            ),\n            answer = SurveyText(\n                color = Color.DarkGray,\n                fontWeight = FontWeight.Medium\n            ),\n            checkedColor = Color.Gray,\n            uncheckedColor = Color.White,\n            borderColor = Color.Gray\n        ),\n        textOptionUI = TextOptionUI(\n            questionTitle = SurveyText(\n                color = Color.DarkGray,\n                fontWeight = FontWeight.ExtraBold\n            ),\n            answer = SurveyText(\n                color = Color.Gray,\n                fontWeight = FontWeight.Medium\n            ),\n            borderColor = Color.Gray,\n            backgroundColor = Color.White,\n            surveyOutlinedText = SurveyOutlinedText(\n                focusedTextColor = Color.DarkGray,\n                unfocusedContainerColor = Color.White,\n                focuedLabelColor = Color.DarkGray\n            )\n        ),\n        callbackAnswers =  {\n\n        },\n        callbackAllAnswered = {\n            showMessage = true\n        })\n\n    if (showMessage) {\n        Snackbar(\n            action = {\n                Button(\n                    onClick = { showMessage = false }\n                ) {\n                    Text(\"Dismiss\")\n                }\n            }\n        ) {\n            Text(text = \"All questions are done\")\n        }\n    }\n}\n```        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekierciyas%2Fsurvey-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzekierciyas%2Fsurvey-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekierciyas%2Fsurvey-compose/lists"}