├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
└── vcs.xml
├── AnimShare.iml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
├── shareDemo.apk
└── src
│ ├── androidTest
│ └── java
│ │ └── cn
│ │ └── xm
│ │ └── weidongjian
│ │ └── animshare
│ │ └── ApplicationTest.java
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── cn
│ │ └── xm
│ │ └── weidongjian
│ │ └── animshare
│ │ ├── MainActivity.java
│ │ └── ShareActivity.java
│ └── res
│ ├── drawable-xhdpi
│ ├── icon_copy.png
│ ├── icon_qq.png
│ ├── icon_qrcode.png
│ ├── icon_qzone.png
│ ├── icon_scan.png
│ ├── icon_wx_friend.png
│ └── icon_wx_timeline.png
│ ├── layout
│ ├── activity_main.xml
│ └── activity_share.xml
│ ├── menu
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── ids.xml
│ ├── strings.xml
│ └── styles.xml
├── art
└── screenShot.gif
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | AnimShare
--------------------------------------------------------------------------------
/.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 | 1.7
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AnimShare.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ShareAnim
2 | ###带动画的分享效果, animation share
3 |
4 | 
5 |
6 | 点击[**这个链接**](http://fir.im/r1n6)下载APK
7 |
8 | You can downLoad APK by click [**this link**](http://fir.im/r1n6)
9 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
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 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | signingConfigs {
5 | config {
6 | keyAlias 'wei'
7 | keyPassword 'jb100000'
8 | storeFile file('G:/kyestores/demo.keystore.jks')
9 | storePassword 'jb100000'
10 | }
11 | }
12 | compileSdkVersion 22
13 | buildToolsVersion "22.0.1"
14 | defaultConfig {
15 | applicationId "cn.xm.weidongjian.animshare"
16 | minSdkVersion 15
17 | targetSdkVersion 22
18 | versionCode 1
19 | versionName "1.0"
20 | }
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | signingConfig signingConfigs.config
26 | }
27 | debug {
28 | signingConfig signingConfigs.config
29 | }
30 | }
31 | }
32 |
33 | dependencies {
34 | compile fileTree(dir: 'libs', include: ['*.jar'])
35 | compile 'com.android.support:appcompat-v7:22.2.0'
36 | }
37 |
--------------------------------------------------------------------------------
/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 E:\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/shareDemo.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/shareDemo.apk
--------------------------------------------------------------------------------
/app/src/androidTest/java/cn/xm/weidongjian/animshare/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package cn.xm.weidongjian.animshare;
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/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/xm/weidongjian/animshare/MainActivity.java:
--------------------------------------------------------------------------------
1 | package cn.xm.weidongjian.animshare;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 |
10 |
11 | public class MainActivity extends AppCompatActivity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_main);
17 |
18 | findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
19 | @Override
20 | public void onClick(View v) {
21 | startActivity(new Intent(MainActivity.this, ShareActivity.class));
22 | overridePendingTransition(0, 0);
23 | }
24 | });
25 | }
26 |
27 | @Override
28 | public boolean onCreateOptionsMenu(Menu menu) {
29 | // Inflate the menu; this adds items to the action bar if it is present.
30 | getMenuInflater().inflate(R.menu.menu_main, menu);
31 | return true;
32 | }
33 |
34 | @Override
35 | public boolean onOptionsItemSelected(MenuItem item) {
36 | // Handle action bar item clicks here. The action bar will
37 | // automatically handle clicks on the Home/Up button, so long
38 | // as you specify a parent activity in AndroidManifest.xml.
39 | int id = item.getItemId();
40 |
41 | //noinspection SimplifiableIfStatement
42 | if (id == R.id.action_settings) {
43 | return true;
44 | }
45 |
46 | return super.onOptionsItemSelected(item);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/xm/weidongjian/animshare/ShareActivity.java:
--------------------------------------------------------------------------------
1 | package cn.xm.weidongjian.animshare;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorListenerAdapter;
5 | import android.animation.AnimatorSet;
6 | import android.animation.ObjectAnimator;
7 | import android.content.ClipData;
8 | import android.content.ClipboardManager;
9 | import android.content.Context;
10 | import android.graphics.Color;
11 | import android.graphics.Point;
12 | import android.os.Bundle;
13 | import android.support.v4.view.animation.FastOutSlowInInterpolator;
14 | import android.support.v7.app.AppCompatActivity;
15 | import android.view.Display;
16 | import android.view.Gravity;
17 | import android.view.View;
18 | import android.view.ViewGroup;
19 | import android.view.ViewTreeObserver;
20 | import android.view.Window;
21 | import android.view.WindowManager;
22 | import android.view.animation.OvershootInterpolator;
23 | import android.widget.FrameLayout;
24 | import android.widget.TextView;
25 | import android.widget.Toast;
26 |
27 | /**
28 | * Created by Weidongjian on 2015/7/10.
29 | */
30 | public class ShareActivity extends AppCompatActivity implements View.OnClickListener {
31 | private TextView tvFriend, tvTimeline, tvQrcode, tvCopylink;
32 | private TextView tvCode = null;
33 | private int screenWidth = 0;
34 | private ViewGroup rootView;
35 | private static final int ANIM_TIME = 500;
36 | private OvershootInterpolator overshootInterpolator = new OvershootInterpolator();
37 | private Context context;
38 |
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | getWindow().requestFeature(Window.FEATURE_NO_TITLE);
42 | super.onCreate(savedInstanceState);
43 | setContentView(R.layout.activity_share);
44 |
45 | context = this;
46 | screenWidth = getScreenWidth(context);
47 | initUI();
48 | }
49 |
50 | private void initUI() {
51 | tvFriend = (TextView) findViewById(R.id.wxFriend);
52 | tvFriend.setOnClickListener(this);
53 | tvTimeline = (TextView) findViewById(R.id.wxTimeline);
54 | tvTimeline.setOnClickListener(this);
55 | tvQrcode = (TextView) findViewById(R.id.qrcode);
56 | tvQrcode.setOnClickListener(this);
57 | tvCopylink = (TextView) findViewById(R.id.copyLink);
58 | tvCopylink.setOnClickListener(this);
59 | findViewById(R.id.parent).setOnClickListener(this);
60 | findViewById(R.id.qqFriend).setOnClickListener(this);
61 | findViewById(R.id.qzone).setOnClickListener(this);
62 |
63 | rootView = (ViewGroup) getWindow().getDecorView().findViewById(android.R.id.content);
64 |
65 | tvFriend.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
66 | @Override
67 | public boolean onPreDraw() {
68 | tvFriend.getViewTreeObserver().removeOnPreDrawListener(this);
69 | tvFriend.setTranslationX(-screenWidth / 2);
70 | tvFriend.setTranslationY(-tvFriend.getHeight() * 2);
71 | return false;
72 | }
73 | });
74 | tvTimeline.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
75 | @Override
76 | public boolean onPreDraw() {
77 | tvTimeline.getViewTreeObserver().removeOnPreDrawListener(this);
78 | tvTimeline.setTranslationX(screenWidth / 2);
79 | tvTimeline.setTranslationY(-tvFriend.getHeight() * 2);
80 | return false;
81 | }
82 | });
83 | tvQrcode.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
84 | @Override
85 | public boolean onPreDraw() {
86 | tvQrcode.getViewTreeObserver().removeOnPreDrawListener(this);
87 | tvQrcode.setTranslationX(-screenWidth / 2);
88 | tvQrcode.setTranslationY(tvFriend.getHeight() * 2);
89 | return false;
90 | }
91 | });
92 | tvCopylink.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
93 | @Override
94 | public boolean onPreDraw() {
95 | tvCopylink.getViewTreeObserver().removeOnPreDrawListener(this);
96 | tvCopylink.setTranslationX(screenWidth / 2);
97 | tvCopylink.setTranslationY(tvFriend.getHeight() * 2);
98 | return false;
99 | }
100 | });
101 |
102 | tvFriend.post(new Runnable() {
103 | @Override
104 | public void run() {
105 | moveInAnim(false);
106 | }
107 | });
108 | }
109 |
110 | @Override
111 | public void onClick(View v) {
112 | switch (v.getId()) {
113 | case R.id.wxFriend:
114 | break;
115 | case R.id.wxTimeline:
116 | break;
117 | case R.id.qrcode:
118 | moveOutAnim(false, true);
119 | break;
120 | case R.id.copyLink:
121 | copyToClipBoard();
122 | break;
123 | case R.id.parent:
124 | back();
125 | break;
126 | case R.id.tvScan:
127 | moveInAnim(true);
128 | break;
129 | case R.id.qqFriend:
130 | break;
131 | case R.id.qzone:
132 | break;
133 | default:
134 | break;
135 | }
136 | }
137 |
138 |
139 | private void moveInAnim(boolean isHideCode) {
140 | ObjectAnimator friendAnimatorX = ObjectAnimator.ofFloat(tvFriend, "TranslationX", 0);
141 | ObjectAnimator friendAnimatorY = ObjectAnimator.ofFloat(tvFriend, "TranslationY", 0);
142 | ObjectAnimator timelineAnimatorX = ObjectAnimator.ofFloat(tvTimeline, "TranslationX", 0);
143 | ObjectAnimator timelineAnimatorY = ObjectAnimator.ofFloat(tvTimeline, "TranslationY", 0);
144 | ObjectAnimator qrcodeAnimatorX = ObjectAnimator.ofFloat(tvQrcode, "TranslationX", 0);
145 | ObjectAnimator qrcodeAnimatorY = ObjectAnimator.ofFloat(tvQrcode, "TranslationY", 0);
146 | ObjectAnimator copyAnimatorX = ObjectAnimator.ofFloat(tvCopylink, "TranslationX", 0);
147 | ObjectAnimator copyAnimatorY = ObjectAnimator.ofFloat(tvCopylink, "TranslationY", 0);
148 |
149 | AnimatorSet set = new AnimatorSet();
150 | set.setDuration(ANIM_TIME);
151 |
152 | if (isHideCode) {
153 | ObjectAnimator animatorX = ObjectAnimator.ofFloat(tvCode, "ScaleX", 0.1f);
154 | ObjectAnimator animatorY = ObjectAnimator.ofFloat(tvCode, "ScaleY", 0.1f);
155 | set.addListener(new AnimatorListenerAdapter() {
156 | @Override
157 | public void onAnimationEnd(Animator animation) {
158 | tvCode.setVisibility(View.INVISIBLE);
159 | }
160 | });
161 | set.playTogether(friendAnimatorX, friendAnimatorY, timelineAnimatorX, timelineAnimatorY
162 | , qrcodeAnimatorX, qrcodeAnimatorY, copyAnimatorX, copyAnimatorY, animatorX, animatorY);
163 | } else {
164 | set.setInterpolator(new FastOutSlowInInterpolator());
165 | set.playTogether(friendAnimatorX, friendAnimatorY, timelineAnimatorX, timelineAnimatorY
166 | , qrcodeAnimatorX, qrcodeAnimatorY, copyAnimatorX, copyAnimatorY);
167 | }
168 |
169 | set.start();
170 | }
171 |
172 |
173 | private void addQrcode() {
174 | if (tvCode != null) {
175 | tvCode.setVisibility(View.VISIBLE);
176 | return;
177 | }
178 | tvCode = new TextView(context);
179 | tvCode.setBackgroundColor(Color.BLACK);
180 | tvCode.setGravity(Gravity.CENTER_HORIZONTAL);
181 | tvCode.setText("请扫描二维码");
182 | tvCode.setPadding(80, 40, 80, 40);
183 | tvCode.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, R.drawable.icon_scan);
184 | tvCode.setCompoundDrawablePadding(20);
185 | tvCode.setTextColor(Color.WHITE);
186 | tvCode.setTextSize(20);
187 | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
188 | params.gravity = Gravity.CENTER;
189 | tvCode.setScaleX(0.1f);
190 | tvCode.setScaleY(0.1f);
191 | tvCode.setId(R.id.tvScan);
192 | tvCode.setOnClickListener(this);
193 | rootView.addView(tvCode, params);
194 | tvCode.setOnClickListener(this);
195 | }
196 |
197 |
198 | private void moveOutAnim(boolean isFinishActivity, boolean isShowCode) {
199 | ObjectAnimator friendAnimatorX = ObjectAnimator.ofFloat(tvFriend, "TranslationX", -screenWidth / 2);
200 | ObjectAnimator friendAnimatorY = ObjectAnimator.ofFloat(tvFriend, "TranslationY", -tvFriend.getHeight() * 2);
201 | ObjectAnimator timelineAnimatorX = ObjectAnimator.ofFloat(tvTimeline, "TranslationX", screenWidth / 2);
202 | ObjectAnimator timelineAnimatorY = ObjectAnimator.ofFloat(tvTimeline, "TranslationY", -tvFriend.getHeight() * 2);
203 | ObjectAnimator qrcodeAnimatorX = ObjectAnimator.ofFloat(tvQrcode, "TranslationX", -screenWidth / 2);
204 | ObjectAnimator qrcodeAnimatorY = ObjectAnimator.ofFloat(tvQrcode, "TranslationY", tvFriend.getHeight() * 2);
205 | ObjectAnimator copyAnimatorX = ObjectAnimator.ofFloat(tvCopylink, "TranslationX", screenWidth / 2);
206 | ObjectAnimator copyAnimatorY = ObjectAnimator.ofFloat(tvCopylink, "TranslationY", tvFriend.getHeight() * 2);
207 |
208 | AnimatorSet set = new AnimatorSet();
209 | set.setDuration(ANIM_TIME);
210 |
211 | if (isShowCode) {
212 | addQrcode();
213 | ObjectAnimator animatorScaleX = ObjectAnimator.ofFloat(tvCode, "ScaleX", 1f);
214 | ObjectAnimator animatorScaleY = ObjectAnimator.ofFloat(tvCode, "ScaleY", 1f);
215 | animatorScaleX.setInterpolator(overshootInterpolator);
216 | animatorScaleY.setInterpolator(overshootInterpolator);
217 | set.playTogether(friendAnimatorX, friendAnimatorY, timelineAnimatorX, timelineAnimatorY
218 | , qrcodeAnimatorX, qrcodeAnimatorY, copyAnimatorX, copyAnimatorY, animatorScaleX, animatorScaleY);
219 | } else {
220 | set.playTogether(friendAnimatorX, friendAnimatorY, timelineAnimatorX, timelineAnimatorY
221 | , qrcodeAnimatorX, qrcodeAnimatorY, copyAnimatorX, copyAnimatorY);
222 | }
223 |
224 | if (isFinishActivity) {
225 | set.addListener(new AnimatorListenerAdapter() {
226 | @Override
227 | public void onAnimationEnd(Animator animation) {
228 | finish();
229 | overridePendingTransition(0, 0);
230 | }
231 | });
232 | }
233 |
234 | set.start();
235 | }
236 |
237 | private void copyToClipBoard() {
238 | ClipboardManager myClipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
239 | ClipData clip = android.content.ClipData.newPlainText("Copied Text", "http://daijiushi.com/");
240 | myClipboard.setPrimaryClip(clip);
241 | Toast.makeText(context, "分享链接已复制到剪切板", Toast.LENGTH_SHORT).show();
242 | }
243 |
244 | private void back() {
245 | if (tvCode != null && tvCode.isShown()) {
246 | moveInAnim(true);
247 | return;
248 | }
249 | moveOutAnim(true, false);
250 | }
251 |
252 | @Override
253 | public void onBackPressed() {
254 | back();
255 | }
256 |
257 | private int getScreenWidth(Context c) {
258 | if (screenWidth == 0) {
259 | WindowManager wm = (WindowManager) c.getSystemService(Context.WINDOW_SERVICE);
260 | Display display = wm.getDefaultDisplay();
261 | Point size = new Point();
262 | display.getSize(size);
263 | screenWidth = size.x;
264 | }
265 | return screenWidth;
266 | }
267 | }
268 |
269 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_copy.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_qq.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_qrcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_qrcode.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_qzone.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_scan.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_wx_friend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_wx_friend.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/icon_wx_timeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/drawable-xhdpi/icon_wx_timeline.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_share.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
17 |
18 |
29 |
30 |
41 |
42 |
43 |
44 |
51 |
52 |
63 |
64 |
75 |
76 |
77 |
78 |
84 |
85 |
96 |
97 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AnimShare
3 |
4 | Hello world!
5 | Settings
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/art/screenShot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/art/screenShot.gif
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weidongjian/ShareAnim/6bdd4645681b14c74e5ce166032030541bec3794/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
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.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------