├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── fndroid
│ │ └── threedtouchdemo
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── fndroid
│ │ │ └── threedtouchdemo
│ │ │ └── MainActivity.java
│ └── res
│ │ ├── drawable
│ │ └── icon.png
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── item.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── fndroid
│ └── threedtouchdemo
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── imgs
└── img.gif
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Android3DTouchDemo
2 |
3 | 博客源码,文章地址:http://www.cnblogs.com/Fndroid/p/5740236.html
4 |
5 | 
6 |
7 |
8 | 8.11更新,把模糊操作放在新的线程中,使用RxJava
9 |
10 | 8.12更新,增加抬手动画以及长按后移动动画,如果需要看博客文章的源码可以恢复至本更新之前代码
11 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.3"
6 | defaultConfig {
7 | applicationId "com.fndroid.threedtouchdemo"
8 | minSdkVersion 18
9 | targetSdkVersion 23
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | renderscriptTargetApi 18
14 | renderscriptSupportModeEnabled true
15 | }
16 | buildTypes {
17 | release {
18 | minifyEnabled false
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | }
22 | }
23 |
24 | dependencies {
25 | compile fileTree(include: ['*.jar'], dir: 'libs')
26 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
27 | exclude group: 'com.android.support', module: 'support-annotations'
28 | })
29 | compile 'com.android.support:appcompat-v7:23.4.0'
30 | compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
31 | testCompile 'junit:junit:4.12'
32 | compile 'com.android.support:cardview-v7:24.0.0'
33 | compile 'io.reactivex:rxjava:1.1.8'
34 | compile 'io.reactivex:rxandroid:1.2.1'
35 | }
36 |
--------------------------------------------------------------------------------
/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 F:\Users\Administrator\AppData\Local\Android\sdk/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 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/fndroid/threedtouchdemo/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.fndroid.threedtouchdemo;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.fndroid.threedtouchdemo", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/fndroid/threedtouchdemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.fndroid.threedtouchdemo;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.AnimatorSet;
6 | import android.animation.ObjectAnimator;
7 | import android.animation.PropertyValuesHolder;
8 | import android.graphics.Bitmap;
9 | import android.graphics.Color;
10 | import android.graphics.Matrix;
11 | import android.os.Bundle;
12 | import android.renderscript.Allocation;
13 | import android.renderscript.Element;
14 | import android.renderscript.RenderScript;
15 | import android.renderscript.ScriptIntrinsicBlur;
16 | import android.support.v7.app.AppCompatActivity;
17 | import android.support.v7.widget.CardView;
18 | import android.support.v7.widget.Toolbar;
19 | import android.util.Log;
20 | import android.view.LayoutInflater;
21 | import android.view.MotionEvent;
22 | import android.view.View;
23 | import android.view.animation.AccelerateDecelerateInterpolator;
24 | import android.widget.AdapterView;
25 | import android.widget.FrameLayout;
26 | import android.widget.ImageView;
27 | import android.widget.LinearLayout;
28 | import android.widget.ListView;
29 | import android.widget.SimpleAdapter;
30 | import android.widget.TextView;
31 |
32 | import java.util.ArrayList;
33 | import java.util.HashMap;
34 | import java.util.List;
35 | import java.util.Map;
36 | import java.util.concurrent.TimeUnit;
37 |
38 | import rx.Observable;
39 | import rx.Subscriber;
40 | import rx.android.schedulers.AndroidSchedulers;
41 | import rx.functions.Action1;
42 | import rx.functions.Func1;
43 | import rx.schedulers.Schedulers;
44 |
45 | import static android.view.View.GONE;
46 |
47 | public class MainActivity extends AppCompatActivity implements AdapterView
48 | .OnItemLongClickListener, View.OnClickListener {
49 | private static final String TAG = "MainActivity";
50 | private LinearLayout root;
51 | private ImageView mCover;
52 | private FrameLayout mRoot;
53 | private ListView mListView;
54 | private Toolbar mToolbar;
55 | private CardView mCardView;
56 | private List