{"id":13498289,"url":"https://github.com/RGirish/Build-Former","last_synced_at":"2025-03-29T00:34:14.840Z","repository":{"id":90724547,"uuid":"43922740","full_name":"RGirish/Build-Former","owner":"RGirish","description":"This is a library for building forms dynamically in Android. ","archived":false,"fork":false,"pushed_at":"2017-03-25T06:08:41.000Z","size":734,"stargazers_count":22,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T15:38:43.219Z","etag":null,"topics":["android","dynamic","forms","json"],"latest_commit_sha":null,"homepage":"","language":"Java","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/RGirish.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}},"created_at":"2015-10-09T00:00:54.000Z","updated_at":"2024-08-26T09:15:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"5244ffad-0e62-4e05-8074-d9f18a137ad1","html_url":"https://github.com/RGirish/Build-Former","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/RGirish%2FBuild-Former","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGirish%2FBuild-Former/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGirish%2FBuild-Former/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGirish%2FBuild-Former/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RGirish","download_url":"https://codeload.github.com/RGirish/Build-Former/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122259,"owners_count":20726822,"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","dynamic","forms","json"],"created_at":"2024-07-31T21:00:21.471Z","updated_at":"2025-03-29T00:34:14.164Z","avatar_url":"https://github.com/RGirish.png","language":"Java","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# BuildFormer\nThis is a dynamic form builder library for Android. Given a LinearLayout to build on, dynamically creating views such as Switches, TextViews, EditTexts and lots more,\nbecomes as easy as calling the methods in this library. Each of the supported views (listed below) has one or more methods within the library that can be called to create\nthe view in the previously set LinearLayout.\n\u003cbr\u003e\u003cbr\u003e\nThe library is for Android developers who want to create any of these supported views dynamically. One kind of application where this library could prove to be immensely helpful would be in creating\nsurvey forms.\n\n\n## An example - Creating an EditText\n```\nLinearLayout layout = (LinearLayout) findViewById(R.id.myLinearLayout);\n\nFormBuilder builder = new FormBuilder(this, layout);\nbuilder.createEditText(\"Enter your name\", FormBuilder.EDIT_TEXT_MODE_HINT, true);\n\n// the first parameter is the description.\n// the second parameter is a flag that tells the library to display the description as a hint.\n// the third parameter if 'true', makes the EditText single-line.\n```\n\n\n## JSON Export/Import\nThe library also provides methods to export the meta data of a dynamically created form into a JSON representation.\n\u003cbr\u003e\u003cbr\u003e\nThis way, a user is able to create a form with the help of this library and is then able to save it in an internal representation. The following is how it is done:\n\n```\nFormBuilder builder = new FormBuilder(this, layout);\nbuilder.createTextView(...);\nbuilder.createCheckbox(...);\nbuilder.createRadioGroup(...);\nbuilder.createEditText(...);\n...\nbuilder.exportAsJson(\"filename.json\");\n```\nThe JSON file is saved in the root directory of the ExternalStorage.\n\u003cbr\u003e\u003cbr\u003e\nOnce this is done, if we need to dynamically create the same form again, all we need to do is this:\n```\nFormBuilder builder = new FormBuilder(this, layout);\nFile file = new File(Environment.getExternalStorageDirectory() + File.separator + \"filename.json\");\n\ntry {\n    builder.createFromJson(file);\n} catch (IOException e) {\n    ...\n}\n```\n\n## Supported views\n1. TextView\n2. EditText\n3. RadioGroup\n3. RadioGroupRatings - a special kind of customized RadioGroup\n4. Checkbox\n5. CheckboxGroup\n6. Switch\n7. DropdownList\n8. DatePicker\n9. TimePicker\n10. SectionBreak\n\n## Adding a dependency to this Library\nThe library is available in the jCenter() repository only:\n```\ncompile 'com.girish.library.buildformer:buildformer:0.9.4'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRGirish%2FBuild-Former","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRGirish%2FBuild-Former","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRGirish%2FBuild-Former/lists"}