├── app ├── .gitignore ├── libs │ └── gson-2.5.jar ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── delete_pic.png │ │ │ │ ├── icon_num_2_1.png │ │ │ │ ├── icon_num_2_2.png │ │ │ │ ├── icon_num_3_1.png │ │ │ │ ├── icon_num_3_2.png │ │ │ │ ├── icon_num_4_1.png │ │ │ │ ├── icon_num_4_2.png │ │ │ │ ├── icon_num_5_1.png │ │ │ │ └── icon_num_5_2.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable │ │ │ │ └── corners_bg_blue.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── anim │ │ │ │ ├── push_down_out.xml │ │ │ │ └── push_up_in.xml │ │ │ └── layout │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_puzzle.xml │ │ │ │ ├── top_bar.xml │ │ │ │ └── activity_puzzle_picker.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── dd │ │ │ │ └── test │ │ │ │ └── puzzleview_android │ │ │ │ └── activity │ │ │ │ ├── entity │ │ │ │ ├── Puzzle.java │ │ │ │ ├── Type.java │ │ │ │ ├── ImageItem.java │ │ │ │ ├── Coordinates.java │ │ │ │ ├── Template.java │ │ │ │ ├── ImageGroup.java │ │ │ │ └── ImageBean.java │ │ │ │ ├── util │ │ │ │ ├── AppUtil.java │ │ │ │ ├── DensityUtil.java │ │ │ │ ├── PicCursorUtil.java │ │ │ │ └── FileUtil.java │ │ │ │ ├── view │ │ │ │ ├── PicItem.java │ │ │ │ ├── SelectItem.java │ │ │ │ ├── TopView.java │ │ │ │ └── PuzzleView.java │ │ │ │ ├── activity │ │ │ │ ├── MainActivity.java │ │ │ │ ├── PuzzleActivity.java │ │ │ │ └── PuzzlePickerActivity.java │ │ │ │ ├── adapter │ │ │ │ ├── AllPicAdapter.java │ │ │ │ ├── SelectAdapter.java │ │ │ │ └── TemplateAdapter.java │ │ │ │ └── dialog │ │ │ │ └── TemplateDialog.java │ │ ├── AndroidManifest.xml │ │ └── assets │ │ │ ├── num_two_style │ │ │ ├── num_three_style │ │ │ ├── num_four_style │ │ │ └── num_five_style │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── dd │ │ │ └── test │ │ │ └── puzzleview_android │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── dd │ │ └── test │ │ └── puzzleview_android │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── app.iml ├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── settings.gradle ├── README.md ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── puzzleview-android.iml ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | puzzleview-android -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # puzzleview-android 2 | puzzle like metu 3 | 4 | -------------------------------------------------------------------------------- /app/libs/gson-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/libs/gson-2.5.jar -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/delete_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/delete_pic.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_2_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_2_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_2_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_2_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_3_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_3_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_3_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_3_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_4_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_4_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_4_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_4_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_5_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_5_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_num_5_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/feinimoshu753/puzzleview-android/HEAD/app/src/main/res/drawable-xhdpi/icon_num_5_2.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | puzzleview-android 3 | 选择图片 4 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/corners_bg_blue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jan 07 16:25:57 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/push_down_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/anim/push_up_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/test/java/com/dd/test/puzzleview_android/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/dd/test/puzzleview_android/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/dd/test/puzzleview_android/activity/entity/Puzzle.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android.activity.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by dd on 16/1/13. 7 | * 所有拼图类型实体 8 | */ 9 | public class Puzzle { 10 | 11 | private List style; 12 | 13 | public List getStyle() { 14 | return style; 15 | } 16 | 17 | public void setStyle(List style) { 18 | this.style = style; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/dd/test/puzzleview_android/activity/entity/Type.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android.activity.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by dd on 16/1/13. 7 | * 相同图片张数的不同排列实体 8 | */ 9 | public class Type { 10 | 11 | private List pic; 12 | 13 | public List getPic() { 14 | return pic; 15 | } 16 | 17 | public void setPic(List pic) { 18 | this.pic = pic; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/dd/test/puzzleview_android/activity/entity/ImageItem.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android.activity.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by dd on 16/1/13. 7 | * 单张图片实体 8 | */ 9 | public class ImageItem { 10 | 11 | private List coordinates; 12 | 13 | public List getCoordinates() { 14 | return coordinates; 15 | } 16 | 17 | public void setCoordinates(List coordinates) { 18 | this.coordinates = coordinates; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/dd/test/puzzleview_android/activity/util/AppUtil.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android.activity.util; 2 | 3 | import android.content.Context; 4 | import android.util.DisplayMetrics; 5 | 6 | /** 7 | * Created by dd on 16/1/13. 8 | */ 9 | public class AppUtil { 10 | 11 | public static int getScreenWidth(Context context) { 12 | 13 | DisplayMetrics dm = context.getResources().getDisplayMetrics(); 14 | return dm.widthPixels; 15 | } 16 | 17 | public static int getScreenHeight(Context context) { 18 | 19 | DisplayMetrics dm = context.getResources().getDisplayMetrics(); 20 | return dm.heightPixels; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/dd/test/puzzleview_android/activity/entity/Coordinates.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android.activity.entity; 2 | 3 | /** 4 | * Created by dd on 16/1/13. 5 | * 坐标实体 6 | */ 7 | public class Coordinates { 8 | 9 | private float x; 10 | private float y; 11 | 12 | public Coordinates(float x, float y){ 13 | this.x = x; 14 | this.y = y; 15 | } 16 | 17 | public float getX() { 18 | return x; 19 | } 20 | 21 | public void setX(float x) { 22 | this.x = x; 23 | } 24 | 25 | public float getY() { 26 | return y; 27 | } 28 | 29 | public void setY(float y) { 30 | this.y = y; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/hmj/develope/android-sdk/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/dd/test/puzzleview_android/activity/entity/Template.java: -------------------------------------------------------------------------------- 1 | package com.dd.test.puzzleview_android.activity.entity; 2 | 3 | /** 4 | * Created by dd on 16/1/13. 5 | * 模板实体 6 | */ 7 | public class Template { 8 | 9 | private int path; 10 | private boolean isSelected; 11 | 12 | public Template(int path, boolean isSelected) { 13 | this.path = path; 14 | this.isSelected = isSelected; 15 | } 16 | 17 | public int getPath() { 18 | return path; 19 | } 20 | 21 | public void setPath(int path) { 22 | this.path = path; 23 | } 24 | 25 | public boolean isSelected() { 26 | return isSelected; 27 | } 28 | 29 | public void setIsSelected(boolean isSelected) { 30 | this.isSelected = isSelected; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /puzzleview-android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.dd.test.puzzleview_android" 9 | minSdkVersion 14 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | 21 | // sourceSets{ 22 | // main{ 23 | // assets.srcDirs = ['assets'] 24 | // } 25 | // } 26 | } 27 | 28 | dependencies { 29 | compile fileTree(dir: 'libs', include: ['*.jar']) 30 | testCompile 'junit:junit:4.12' 31 | compile 'com.android.support:appcompat-v7:23.1.1' 32 | compile 'com.android.support:support-v4:23.1.1' 33 | compile 'com.android.support:cardview-v7:23.1.1' 34 | compile 'com.android.support:recyclerview-v7:23.1.1' 35 | compile 'com.github.bumptech.glide:glide:3.6.1' 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 |