{"id":19483696,"url":"https://github.com/lizhangqu/frescoloader","last_synced_at":"2025-07-01T07:08:38.551Z","repository":{"id":142563495,"uuid":"98404583","full_name":"lizhangqu/FrescoLoader","owner":"lizhangqu","description":"FrescoLoader is a framework which use fresco to load image into android.widget.ImageView.","archived":false,"fork":false,"pushed_at":"2019-06-03T01:48:05.000Z","size":209,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T16:46:17.270Z","etag":null,"topics":["android","fresco","imageloader"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/lizhangqu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2017-07-26T09:21:54.000Z","updated_at":"2023-05-25T03:29:19.000Z","dependencies_parsed_at":"2023-05-02T15:00:32.984Z","dependency_job_id":null,"html_url":"https://github.com/lizhangqu/FrescoLoader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lizhangqu/FrescoLoader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhangqu%2FFrescoLoader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhangqu%2FFrescoLoader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhangqu%2FFrescoLoader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhangqu%2FFrescoLoader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lizhangqu","download_url":"https://codeload.github.com/lizhangqu/FrescoLoader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizhangqu%2FFrescoLoader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262916681,"owners_count":23383889,"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","fresco","imageloader"],"created_at":"2024-11-10T20:16:23.094Z","updated_at":"2025-07-01T07:08:38.536Z","avatar_url":"https://github.com/lizhangqu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## FrescoLoader\n\nFrescoLoader is a framework which uses fresco to load an image into the **android.widget.ImageView**.\n\n## Changelog\n\nSee changelog details in [CHANGELOG](https://github.com/lizhangqu/FrescoLoader/blob/master/CHANGELOG.md).\n\n## Examples\n\nI have provided a sample.\n\nSee sample [here on Github](https://github.com/lizhangqu/FrescoLoader/tree/master/app).\n\nTo run the sample application, simply clone this repository and use android studio to compile it, then install it on a connected device.\n\n## Note\n\n\u003eIf you use this FrescoLoader, please make sure you have not use the ImageView's tag.\n\n## Usage\n\n### Dependency\n\n**latest version**\n\n[ ![Download](https://api.bintray.com/packages/lizhangqu/maven/fresco-loader/images/download.svg) ](https://bintray.com/lizhangqu/maven/fresco-loader/_latestVersion)\n\n\u003ecurrent not release a version\n\n**gradle**\n\n```\ndependencies {\n    compile \"io.github.lizhangqu:fresco-loader:${latest_version}\"\n}\n```\n\n**maven**\n\n```\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eio.github.lizhangqu\u003c/groupId\u003e\n      \u003cartifactId\u003efresco-loader\u003c/artifactId\u003e\n      \u003cversion\u003e${latest_version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n### Fresco \n\nAdd fresco dependencies as you need.\n\n```\n// fresco base\ncompile(\"com.facebook.fresco:fresco:${FRESCO_VERSION}\") {\n    exclude group: 'com.android.support'\n}\n// fresco gif support(if you need gif add this)\ncompile(\"com.facebook.fresco:animated-gif:${FRESCO_VERSION}\") {\n    exclude group: 'com.android.support'\n}\n// fresco dynamic webp support(if you need dynamic webp add this)\ncompile(\"com.facebook.fresco:animated-webp:${FRESCO_VERSION}\") {\n    exclude group: 'com.android.support'\n}\n// fresco static webp support(if you need static webp add this)\ncompile(\"com.facebook.fresco:webpsupport:${FRESCO_VERSION}\") {\n    exclude group: 'com.android.support'\n}\n```\n\n### Loader Sample\n\n```\nFrescoLoader.with(view.getContext())\n            .progressiveRenderingEnabled(true)\n            .fadeDuration(2000)\n            .autoPlayAnimations(true)\n            .autoRotateEnabled(true)\n            .retainImageOnFailure(true)\n            .desiredAspectRatioWithHeight(0.5F)\n            .tapToRetryEnabled(true)\n            .focusPoint(new PointF(30, 50))\n            .resize(400, 400)\n            .fadeDuration(1000)\n            .border(Color.RED, 10)\n            .borderColor(Color.RED)\n            .borderWidth(10)\n            .cornersRadii(10, 10, 10, 10)\n            .cornersRadius(10)\n            .roundAsCircle()\n            .backgroundDrawable(ContextCompat.getDrawable(getApplicationContext(), R.mipmap.bg_zero))\n            .progressBar(ContextCompat.getDrawable(getApplicationContext(), R.mipmap.icon_progress_bar))\n            .progressBarScaleType(ImageView.ScaleType.CENTER_CROP)\n            .placeholder(ContextCompat.getDrawable(getApplicationContext(), R.mipmap.icon_placeholder))\n            .placeholderScaleType(ImageView.ScaleType.CENTER_CROP)\n            .failure(ContextCompat.getDrawable(getApplicationContext(), R.mipmap.icon_failure))\n            .failureScaleType(ImageView.ScaleType.CENTER_CROP)\n            .retry(ContextCompat.getDrawable(getApplicationContext(), R.mipmap.icon_retry))\n            .retryScaleType(ImageView.ScaleType.CENTER_CROP)\n            .colorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.DARKEN))\n            .overlays(overlays)\n            .pressedStateOverlay(ContextCompat.getDrawable(getApplicationContext(), R.mipmap.bg_one))\n            .actualScaleType(ImageView.ScaleType.CENTER_CROP)\n            .lowerLoad(R.mipmap.ic_launcher_round)\n            .load(\"http://desk.fd.zol-img.com.cn/t_s960x600c5/g5/M00/0D/01/ChMkJlgq0z-IC78PAA1UbwykJUgAAXxIwMAwQcADVSH340.jpg\")\n            .localThumbnailPreviewsEnabled(true)\n            .into(image);\n```\n\nSee more details in class [FrescoLoader.java](https://github.com/lizhangqu/FrescoLoader/blob/master/library/src/main/java/io/github/lizhangqu/fresco/FrescoLoader.java)\n\nIf you have extended the android.widget.ImageView class and you can add some method to it, you'd better add this. But it's not necessary if you don't want.\n\n```\npublic class MyImageView extends ImageView implements FrescoLoader.TemporaryDetachListener {\n    //holder the TemporaryDetachListener\n    FrescoLoader.TemporaryDetachListener listener;\n\n    public MyImageView(Context context) {\n        super(context);\n    }\n\n    public MyImageView(Context context, @Nullable AttributeSet attrs) {\n        super(context, attrs);\n    }\n\n    public MyImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {\n        super(context, attrs, defStyleAttr);\n    }\n\n    @Override\n    public void onStartTemporaryDetach() {\n        super.onStartTemporaryDetach();\n        //call delegete\n        if (this.listener != null) {\n            listener.onStartTemporaryDetach(this);\n        }\n\n    }\n\n    @Override\n    public void onFinishTemporaryDetach() {\n        super.onFinishTemporaryDetach();\n        //call delegete\n        if (this.listener != null) {\n            listener.onFinishTemporaryDetach(this);\n        }\n    }\n\n    @Override\n    public void onSaveTemporaryDetachListener(FrescoLoader.TemporaryDetachListener listener) {\n        //holder it\n        this.listener = listener;\n    }\n\n    @Override\n    public void onStartTemporaryDetach(View view) {\n        //empty\n    }\n\n    @Override\n    public void onFinishTemporaryDetach(View view) {\n        //empty\n    }\n}\n\n```\n\n## License\n\nFrescoLoader is under the BSD license. See the [LICENSE](https://github.com/lizhangqu/FrescoLoader/blob/master/LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizhangqu%2Ffrescoloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flizhangqu%2Ffrescoloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizhangqu%2Ffrescoloader/lists"}