{"id":13610025,"url":"https://github.com/idapgroup/ArgumentDelegate","last_synced_at":"2025-04-12T22:32:30.617Z","repository":{"id":57725139,"uuid":"180871965","full_name":"idapgroup/ArgumentDelegate","owner":"idapgroup","description":"Property binding for Android Bundle arguments.","archived":false,"fork":false,"pushed_at":"2022-02-18T15:57:50.000Z","size":143,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-07T16:41:47.677Z","etag":null,"topics":["android","arguments","bundle","intent","kotlin","property-delegate"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idapgroup.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-04-11T20:23:32.000Z","updated_at":"2023-09-08T17:52:36.000Z","dependencies_parsed_at":"2022-09-11T17:22:13.569Z","dependency_job_id":null,"html_url":"https://github.com/idapgroup/ArgumentDelegate","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/idapgroup%2FArgumentDelegate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idapgroup%2FArgumentDelegate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idapgroup%2FArgumentDelegate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idapgroup%2FArgumentDelegate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idapgroup","download_url":"https://codeload.github.com/idapgroup/ArgumentDelegate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248641193,"owners_count":21138164,"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","arguments","bundle","intent","kotlin","property-delegate"],"created_at":"2024-08-01T19:01:40.436Z","updated_at":"2025-04-12T22:32:30.329Z","avatar_url":"https://github.com/idapgroup.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"Argument Delegate\n============\n\nProperty binding for Android Bundle arguments. Written for simple bundle unpacking for Kotlin users.\n\nDownload\n--------\n\n[ ![Download](https://api.bintray.com/packages/idapgroup/kotlin/argument-delegate/images/download.svg?version=1.0.3) ](https://bintray.com/idapgroup/kotlin/argument-delegate/1.0.3/link)\n\nAdd repository to your root `build.gradle`\n\n```groovy\nrepositories {\n    jcenter()\n}\n```\n\n\n```groovy\ndependencies {\n  implementation 'com.idapgroup:argument-delegate:latest-version'\n}\n```\n\n\nUsage sample\n-------------\n\n```kotlin\nclass ExampleActivity : Activity {\n\n    val userName: String by argumentDelegate()\n    \n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        // your activity setup code\n        Log.d(\"ExampleActivity\", \"userName - $userName\")\n    }\n\n}\n```\n\n__Remember: Bundled argument name must have the same name as property have. For current example:__\n\n```kotlin\nval bundle = Bundle().apply {\n    putString(\"userName\", \"John\")\n}\n```\n\nAdditional info\n-------------\n\n__argumentDelegate__ is an extension function for Fragment and Activity. If you want to use it \nout of the Activity/Fragment then you should implement _argumentWrapper_ block. \nExample:\n\n```kotlin\nclass Example {\n    private lateinit var bundle: Bundle\n    private val wrapper = { a: Example -\u003e a.bundle }\n    val userName: String by argumentDelegate(wrapper)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidapgroup%2FArgumentDelegate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidapgroup%2FArgumentDelegate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidapgroup%2FArgumentDelegate/lists"}