{"id":13643617,"url":"https://github.com/githubwing/DragPhotoView","last_synced_at":"2025-04-21T02:30:47.882Z","repository":{"id":96897315,"uuid":"77157552","full_name":"githubwing/DragPhotoView","owner":"githubwing","description":"A photoView to scale image and finish activity，高仿微信可拖拽返回PhotoView","archived":false,"fork":false,"pushed_at":"2017-05-12T10:22:24.000Z","size":4433,"stargazers_count":1607,"open_issues_count":13,"forks_count":247,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-09T04:04:47.626Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubwing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-12-22T15:58:55.000Z","updated_at":"2025-03-07T05:32:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"f51e00bd-4fbf-4dcf-931f-563c040caee2","html_url":"https://github.com/githubwing/DragPhotoView","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubwing%2FDragPhotoView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubwing%2FDragPhotoView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubwing%2FDragPhotoView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubwing%2FDragPhotoView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubwing","download_url":"https://codeload.github.com/githubwing/DragPhotoView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249986033,"owners_count":21356311,"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":[],"created_at":"2024-08-02T01:01:50.215Z","updated_at":"2025-04-21T02:30:44.471Z","avatar_url":"https://github.com/githubwing.png","language":"Java","readme":"# DragPhotoView([English](https://github.com/githubwing/DragPhotoView/blob/master/README_EN.md))\n\n[![](https://jitpack.io/v/githubwing/DragPhotoView.svg)](https://jitpack.io/#githubwing/DragPhotoView)\n\n高仿微信可拖拽返回PhotoView\n\n\n### 基于 [PhotoView](https://github.com/chrisbanes/PhotoView)\n\n##[下载APK体验](https://github.com/githubwing/DragPhotoView/raw/master/app-debug.apk)\n\n## 特性\n- 拖拽缩放图片,并且结束Activity\n- 其他PhotoView所有特性如下:\n\n\u003e- Out of the box zooming, using multi-touch and double-tap.\n\u003e- Scrolling, with smooth scrolling fling.\n\u003e- Works perfectly when used in a scrolling parent (such as ViewPager).\n\u003e- Allows the application to be notified when the displayed Matrix has changed. Useful for when you need to update your UI based on the \u003ecurrent zoom/scroll position.\n\u003e- Allows the application to be notified when the user taps on the Photo.\n\n![image](https://github.com/githubwing/DragPhotoView/raw/master/img/img.gif)\n\n\n\n# 使用\n\n修改你的  `build.gradle`文件\n\n```gradle\n\n//root project\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n    \n//module project\n    \tdependencies {\n\t        compile 'com.github.githubwing:DragPhotoView:1.0.1'\n\t}\n    \n```\n\n使用法放和普通的ImageView一毛一样\n\n```java\n\n\n\t// 所有ImageView用法都可以\t\n\tDragPhotoView photoView = (DragPhotoView)findViewById(R.id.photoView);\n\tphotoView.setImageResource(R.drawable.ram);\n\t//必须添加一个onExitListener,在拖拽到底部时触发.\t\n\tphotoView.setOnExitListener()\n\t\n\tphotoView.setOnTapListener()\n```\n\n## 小贴士\n\n想要达到demo效果,需要把你的Activity背景改为透明\n\n修改`style.xml`\n```xml\n  \u003cstyle name=\"translucent\" parent=\"Theme.AppCompat.Light.NoActionBar\"\u003e\n        \u003citem name=\"android:windowBackground\" \u003e@android:color/transparent\u003c/item\u003e\n        \u003citem name=\"android:windowIsTranslucent\"\u003etrue\u003c/item\u003e\n    \u003c/style\u003e\n```\n全版本共享元素实现(包括Activity转跳和拖拽共享元素)在Demo里,如有需要,参照demo思路实现即可.\n\n## 欢迎Star ,欢迎加入我的Android酒馆 :425983695\n# License\n\n    Copyright 2016 androidwing1992\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n        http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":["ImageView"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubwing%2FDragPhotoView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubwing%2FDragPhotoView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubwing%2FDragPhotoView/lists"}