├── README
├── .gitignore
└── CustomActivityTransition
├── res
├── drawable-hdpi
│ └── ic_launcher.png
├── drawable-ldpi
│ └── ic_launcher.png
├── drawable-mdpi
│ └── ic_launcher.png
├── values
│ └── strings.xml
├── anim
│ ├── slide_in_bottom.xml
│ ├── slide_in_top.xml
│ ├── slide_out_top.xml
│ ├── slide_out_bottom.xml
│ ├── slide_in_left.xml
│ ├── slide_in_right.xml
│ ├── slide_out_left.xml
│ └── slide_out_right.xml
└── layout
│ ├── third.xml
│ ├── second.xml
│ └── main.xml
├── README
├── .classpath
├── project.properties
├── src
└── com
│ └── habibm
│ └── customactivitytransition
│ ├── ThirdActivity.java
│ ├── SecondActivity.java
│ └── CustomActivityTransitionActivity.java
├── .project
├── AndroidManifest.xml
└── proguard.cfg
/README:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | */bin
2 | */gen
3 | *local.properties
4 |
5 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/habibm/Android-Custom-Activity-Transition/HEAD/CustomActivityTransition/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CustomActivityTransition/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/habibm/Android-Custom-Activity-Transition/HEAD/CustomActivityTransition/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/CustomActivityTransition/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/habibm/Android-Custom-Activity-Transition/HEAD/CustomActivityTransition/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CustomActivityTransition/README:
--------------------------------------------------------------------------------
1 | A sample application that shows how to implement custom transition between activities.
2 | Following transition are added:
3 | - Slide in-out left-right
4 | - Slide in-out top-bottom
--------------------------------------------------------------------------------
/CustomActivityTransition/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World, CustomActivityTransitionActivity!
5 | CustomActivityTransition
6 |
7 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_in_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_in_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_out_top.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_out_bottom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/layout/third.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
10 |
11 |
--------------------------------------------------------------------------------
/CustomActivityTransition/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CustomActivityTransition/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-7
12 |
--------------------------------------------------------------------------------
/CustomActivityTransition/src/com/habibm/customactivitytransition/ThirdActivity.java:
--------------------------------------------------------------------------------
1 | package com.habibm.customactivitytransition;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 |
6 | public class ThirdActivity extends Activity{
7 |
8 | @Override
9 | public void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.third);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/layout/second.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/CustomActivityTransition/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/CustomActivityTransition/src/com/habibm/customactivitytransition/SecondActivity.java:
--------------------------------------------------------------------------------
1 | package com.habibm.customactivitytransition;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.View;
7 |
8 | public class SecondActivity extends Activity{
9 |
10 | @Override
11 | public void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.second);
14 | }
15 |
16 | public void onClickNext(View view) {
17 | Intent intent = new Intent(this, ThirdActivity.class);
18 | startActivityForResult(intent, 600);
19 | overridePendingTransition(R.anim.slide_in_bottom, R.anim.slide_out_top);
20 | }
21 |
22 | @Override
23 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
24 | overridePendingTransition(R.anim.slide_in_top, R.anim.slide_out_bottom);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CustomActivityTransition/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | CustomActivityTransition
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/CustomActivityTransition/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CustomActivityTransition/src/com/habibm/customactivitytransition/CustomActivityTransitionActivity.java:
--------------------------------------------------------------------------------
1 | package com.habibm.customactivitytransition;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.view.View;
7 |
8 | public class CustomActivityTransitionActivity extends Activity {
9 | /** Called when the activity is first created. */
10 | @Override
11 | public void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.main);
14 | }
15 |
16 | public void onClickNext(View view) {
17 | Intent intent = new Intent(this, SecondActivity.class);
18 | startActivityForResult(intent, 500);
19 | overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);
20 | }
21 |
22 | @Override
23 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
24 | overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_right);
25 | }
26 | }
--------------------------------------------------------------------------------
/CustomActivityTransition/proguard.cfg:
--------------------------------------------------------------------------------
1 | -optimizationpasses 5
2 | -dontusemixedcaseclassnames
3 | -dontskipnonpubliclibraryclasses
4 | -dontpreverify
5 | -verbose
6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7 |
8 | -keep public class * extends android.app.Activity
9 | -keep public class * extends android.app.Application
10 | -keep public class * extends android.app.Service
11 | -keep public class * extends android.content.BroadcastReceiver
12 | -keep public class * extends android.content.ContentProvider
13 | -keep public class * extends android.app.backup.BackupAgentHelper
14 | -keep public class * extends android.preference.Preference
15 | -keep public class com.android.vending.licensing.ILicensingService
16 |
17 | -keepclasseswithmembernames class * {
18 | native ;
19 | }
20 |
21 | -keepclasseswithmembers class * {
22 | public (android.content.Context, android.util.AttributeSet);
23 | }
24 |
25 | -keepclasseswithmembers class * {
26 | public (android.content.Context, android.util.AttributeSet, int);
27 | }
28 |
29 | -keepclassmembers class * extends android.app.Activity {
30 | public void *(android.view.View);
31 | }
32 |
33 | -keepclassmembers enum * {
34 | public static **[] values();
35 | public static ** valueOf(java.lang.String);
36 | }
37 |
38 | -keep class * implements android.os.Parcelable {
39 | public static final android.os.Parcelable$Creator *;
40 | }
41 |
--------------------------------------------------------------------------------