Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.huantansheng:easyphotos:3.1.5'
}
dependencies {
implementation("com.github.huantansheng:easyphotos:3.1.5")
}
<dependency>
<groupId>com.github.huantansheng</groupId>
<artifactId>easyphotos</artifactId>
<version>3.1.5</version>
</dependency>
libraryDependencies += "com.github.huantansheng" % "easyphotos" % "3.1.5"
:dependencies [[com.github.huantansheng/easyphotos "3.1.5"]]
QQ交流群:EasyPhotos开发交流群:288600953 (已满)
QQ交流群:EasyPhotos开发交流群二群:212324053
若无法下载demo,可以在QQ交流群的群文件下载,文件名为demo-release,下载最新的即可。
| 无选中状态(默认UI色调) | 选中状态( 自定义UI色调) | 其他功能(各功能可自选) |
|:-----------:|:--------:|:---------:|
| |
|
|
| 专辑列表(默认UI色调) | 相册带广告( 自定义UI色调) | 专辑列表带广告 |
|:-------:|:---------:|:---------:|
| |
|
|
| 预览页 | 预览页单击图片转全屏模式 | 预览页缩放图片 |
|:-------:|:---------:|:---------:|
| |
|
|
|预览页单击缩放图片显示操作栏 | 拼图选择页| 拼图选择页 |
|:-------:|:---------:|:---------:|
| |
|
|
|拼图页 | 拼图页拼图功能| 拼图页文字贴纸功能 |
|:-------:|:---------:|:---------:|
| |
|
|
|文字贴纸编辑页 | 示例功能列表 | 示例功能列表 |
|:-------:|:---------:|:---------:|
| |
|
|
compileSdkVersion 30
minSdkVersion 15
targetSdkVersion 30
compileSdkVersion 28
minSdkVersion 15
targetSdkVersion 28
buildToolsVersion '28.0.3'
首先,在项目的 build.gradle(project)
文件里面添加:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
最后,在你需要用到EasyPhotos的module中的 build.gradle(module)
文件里面添加:
dependencies {
implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.5' //androidx版本,支持android 10、11,永久维护
//implementation 'com.github.HuanTanSheng:EasyPhotos:2.4.5' //还没有升级到androidx的同学可以用这个版本,但不支持android 10,暂停维护
}
如果你的 android studio
版本低于3.4.2版,有可能会打不开我的Demo,只需要修改Demo里面 build.gradle(project)
文件中的:
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
//把3.4.2改成你对应的版本即可,如果不清楚对应版本可以看看你其他正常项目的这里是怎么写的
}
EasyPhotos的混淆:
-keep class com.huantansheng.easyphotos.models.** { *; }
QQ交流群:288600953 (已满) QQ交流群:EasyPhotos开发交流群二群:212324053
PhotoView:一个强大的图片缩放库,由chrisbanes 大神编写
PuzzleView:一个强大的拼图库,我的拼图功能是在此基础上实现,这个库由wuapnjie 编写。
EasyPhotos目前还在更新,欢迎各种Issues以及加群讨论,只是目前本人精力以及本职工作原因,更新不会频繁,只能保证不定期查看反馈统一修改,希望各位理解,感谢!
QQ交流群:288600953 (已满)
QQ交流群:EasyPhotos开发交流群二群:212324053
3.1.5:
3.1.4:
3.1.3:
3.1.1:
3.1.0:
3.0.6:
3.0.5:
3.0.4:
3.0.3:
3.0.2:
3.0.1:
2.5.2:
2.4.9:
2.4.8:
2.4.7:
2.4.6:
2.4.5:
2.4.4:
2.4.3:
2.4.1:
2.4.0:
2.3.6:
2.3.5:
2.3.4:
2.3.3:
2.3.2:
2.3.1:
2.3.0:
2.2.9:
2.2.8:
2.2.6:
2.2.4:
2.2.3:
2.2.2:
2.1.0:
<string name="gif_easy_photos">动图</string>
具体查看11-多语言
2.0.2:
2.0.1:
2.0.0:
1.3.2:
<string name="done_easy_photos">完成</string>
<string name="cancel_easy_photos">取消</string>
<string name="template_easy_photos">模板</string>
<!--图片预览页-->
<color name="preview_status_easy_photos">#d73c3d41</color>//api21以上预览页状态栏颜色为该色值;api19和api20状态栏为透明色;其余api状态栏或透明或黑或灰,取决于各家rom和有无实体按键等因素。注:其余页面状态栏根据你的主题走
<!--拼图页-->
<color name="puzzle_background_easy_photos">#000000</color>//拼图页面背景色
<color name="puzzle_selected_frame_easy_photos">#57a457</color>//拼图页面当前处理item的边框颜色
<color name="puzzle_selected_controller_easy_photos">#00AA00</color>//拼图页面当前处理item的操作bar颜色,就是item边框中凸起矩形的色值
<color name="puzzle_menu_easy_photos">#969696</color>//拼图页面的文字按钮和示例图片颜色
<color name="puzzle_menu_done_easy_photos">#009700</color>//拼图页面的完成按钮文字颜色
<color name="puzzle_bottom_bar_line_easy_photos">#ee3a3a3e</color>//拼图的底部栏间隔颜色
<color name="puzzle_photo_background">#ffffff</color>//图片的背景颜色
1.2.8:
1.2.7:
<color name="preview_bottom_bar_easy_photos">#eb212123</color>//预览页的底部栏和选中图片列表背景颜色
<color name="preview_bottom_bar_line_easy_photos">#ee3a3a3e</color>//预览页的底部栏与选中图片列表的分割线颜色
1.2.6:
1.2.3:
1.2.2:
1.2.1:
1.2.0:
1.1.1:
1.1.0:
1.0.9:
1.0.8:
1.0.7:
1.0.6:
1.0.5:
1.0.4: