{"id":13735211,"url":"https://github.com/matteocrippa/Parrot","last_synced_at":"2025-05-08T11:32:33.122Z","repository":{"id":151221939,"uuid":"115190201","full_name":"matteocrippa/Parrot","owner":"matteocrippa","description":"A simple way to handle remote image in Kotlin.","archived":false,"fork":false,"pushed_at":"2018-08-22T13:15:49.000Z","size":95,"stargazers_count":22,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-03T03:04:35.928Z","etag":null,"topics":["fuel","glide","image","image-download","image-downloader","imageview","kotlin","network"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/matteocrippa.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":"2017-12-23T11:09:45.000Z","updated_at":"2024-08-03T03:04:37.845Z","dependencies_parsed_at":null,"dependency_job_id":"e8fc6af9-6a0f-4917-8973-4f333f808103","html_url":"https://github.com/matteocrippa/Parrot","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocrippa%2FParrot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocrippa%2FParrot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocrippa%2FParrot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteocrippa%2FParrot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matteocrippa","download_url":"https://codeload.github.com/matteocrippa/Parrot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224727173,"owners_count":17359532,"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":["fuel","glide","image","image-download","image-downloader","imageview","kotlin","network"],"created_at":"2024-08-03T03:01:04.215Z","updated_at":"2024-11-15T03:31:33.342Z","avatar_url":"https://github.com/matteocrippa.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":["Android"],"readme":"# Parrot\n\n\nA kotlin extension to load easily remote images in your `ImageView`.\n\n![parrot](https://github.com/matteocrippa/parrot/blob/master/.github/parrot.png?raw=true)\n\n\n# Install\n\nAdd to **gradle** in _allprojects_\n\n```\nmaven { url 'https://jitpack.io' }\n```\n\nthen add this\n\n```\ncompile 'com.github.matteocrippa:Parrot:0.0.6'\n```\n\n# Usage\n`Parrot` needs to be init once, passing the app context:\n\n```kotlin\nParrot(context)\n```\n\nthen provides you a simple function to tame all your needs:\n\n`ImageView.load`\n\nThis function has the following parameters:\n- `url`, _optional_ string with current remote image url\n- `placeholder`, _optional_ bitmap placeholder or resource Id\n- `caching`, you can set your favorite caching system, see below\n- `manipulate`, _optional_ callback returns the image before setting to your imageview, here you can tweak the image\n- `onPlaceholder`, _optional_ callback returns if a placeholder has been set\n- `onComplete`, _optional_ callback returns when the image has been applied to the imageview\n\n\n## Caching\n`Parrot` provide an easy way to handle images caching:\n\n- `NetOnly`, _default_ option, force always reloading from net\n- `NetThenDisk`, download once and use local version\n\n## Examples\n\nSimple usage\n```kotlin\n\nimageView.loadImage(\"http://the-most-awesome-image.png\")\n```\n\nCallback usage\n```kotlin\nimageView.loadImage(\"http://the-most-awesome-image.png\", \n    manipulate = { bitmap -\u003e\n        // alter bitmap\n        bitmap\n    }, onComplete = { completed -\u003e\n        // do something\n    }                                        \n\n```\n\n#### Credits\n\nIcon is taken by free emojii set by [Vincent Le Moign](https://dribbble.com/webalys)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteocrippa%2FParrot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatteocrippa%2FParrot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteocrippa%2FParrot/lists"}