() {
547 | @Override
548 | public SavedState createFromParcel(Parcel in) {
549 | return new SavedState(in);
550 | }
551 |
552 | @Override
553 | public SavedState[] newArray(int size) {
554 | return new SavedState[size];
555 | }
556 | };
557 | }
558 | }
559 |
560 | interface PageIndicator extends ViewPager.OnPageChangeListener {
561 | /**
562 | * Bind the indicator to a ViewPager.
563 | *
564 | * @param view
565 | */
566 | void setViewPager(ViewPager view);
567 |
568 | /**
569 | * Bind the indicator to a ViewPager.
570 | *
571 | * @param view
572 | * @param initialPosition
573 | */
574 | void setViewPager(ViewPager view, int initialPosition);
575 |
576 | /**
577 | * Set the current page of both the ViewPager and indicator.
578 | *
579 | * This must be used if you need to set the page before
580 | * the views are drawn on screen (e.g., default start page).
581 | *
582 | * @param item
583 | */
584 | void setCurrentItem(int item);
585 |
586 | /**
587 | * Set a page change listener which will receive forwarded events.
588 | *
589 | * @param listener
590 | */
591 | void setOnPageChangeListener(ViewPager.OnPageChangeListener listener);
592 |
593 | /**
594 | * Notify the indicator that the fragment list has changed.
595 | */
596 | void notifyDataSetChanged();
597 | }
598 |
--------------------------------------------------------------------------------
/app/src/main/java/com/takeoffandroid/appintroanimation/ColorShades.java:
--------------------------------------------------------------------------------
1 | package com.takeoffandroid.appintroanimation;
2 |
3 | import android.graphics.Color;
4 |
5 |
6 | /**
7 | *
8 | * Source from : https://gist.github.com/cooltechworks/4f37021b1216f773daf8
9 | * Color shades will provide all the intermediate colors between two colors. It just requires a decimal value between 0.0 to 1.0
10 | * and it provides the exact shade combination of the two color with this shade value.
11 | *
12 | * Textual explanation :
13 | *
14 | * |===============|===============|===============|===============|
15 | * White LtGray Gray DkGray Black
16 | *
17 | * 0 0.25 0.5 0.75 1
18 | *
19 | * Given two colors as White and Black,
20 | * and shade
21 | * as 0 gives White
22 | * as 0.25 gives Light gray
23 | * as 0.5 gives Gray
24 | * as 0.75 gives Dark gray
25 | * as 1 gives Black.
26 | *
27 | */
28 | public class ColorShades {
29 |
30 | private int mFromColor;
31 | private int mToColor;
32 | private float mShade;
33 |
34 | public ColorShades setFromColor(int fromColor) {
35 | this.mFromColor = fromColor;
36 | return this;
37 | }
38 |
39 | public ColorShades setToColor(int toColor) {
40 | this.mToColor = toColor;
41 | return this;
42 | }
43 |
44 | public ColorShades setFromColor(String fromColor) {
45 |
46 | this.mFromColor = Color.parseColor(fromColor);
47 | return this;
48 | }
49 |
50 | public ColorShades setToColor(String toColor) {
51 | this.mToColor = Color.parseColor(toColor);
52 | return this;
53 | }
54 |
55 | public ColorShades forLightShade(int color) {
56 | setFromColor(Color.WHITE);
57 | setToColor(color);
58 | return this;
59 | }
60 |
61 | public ColorShades forDarkShare(int color) {
62 | setFromColor(color);
63 | setToColor(Color.BLACK);
64 | return this;
65 | }
66 |
67 | public ColorShades setShade(float mShade) {
68 | this.mShade = mShade;
69 | return this;
70 | }
71 |
72 |
73 | /**
74 | * Generates the shade for the given color.
75 | * @return the int value of the shade.
76 | */
77 | public int generate() {
78 |
79 | int fromR = (Color.red(mFromColor));
80 | int fromG = (Color.green(mFromColor));
81 | int fromB = (Color.blue(mFromColor));
82 |
83 | int toR = (Color.red(mToColor));
84 | int toG = (Color.green(mToColor));
85 | int toB = (Color.blue(mToColor));
86 |
87 | int diffR = toR - fromR;
88 | int diffG = toG - fromG;
89 | int diffB = toB - fromB;
90 |
91 |
92 |
93 | int R = fromR + (int) (( diffR * mShade));
94 | int G = fromG + (int) (( diffG * mShade));
95 | int B = fromB + (int) (( diffB * mShade));
96 |
97 | return Color.rgb(R, G, B);
98 |
99 | }
100 |
101 |
102 | /**
103 | * Assumes the from and to color are inverted before generating the shade.
104 | * @return the int value of the inverted shade.
105 | */
106 | public int generateInverted() {
107 |
108 | int fromR = (Color.red(mFromColor));
109 | int fromG = (Color.green(mFromColor));
110 | int fromB = (Color.blue(mFromColor));
111 |
112 | int toR = (Color.red(mToColor));
113 | int toG = (Color.green(mToColor));
114 | int toB = (Color.blue(mToColor));
115 |
116 |
117 | int diffR = toR - fromR;
118 | int diffG = toG - fromG;
119 | int diffB = toB - fromB;
120 |
121 | int R = toR - (int) (( diffR * mShade));
122 | int G = toG - (int) (( diffG * mShade));
123 | int B = toB - (int) (( diffB * mShade));
124 |
125 | return Color.rgb(R, G, B);
126 |
127 | }
128 |
129 | /**
130 | * Gets the String equivalent of the generated shade
131 | * @return String value of the shade
132 | */
133 | public String generateInvertedString() {
134 | return String.format("#%06X", 0xFFFFFF & generateInverted());
135 | }
136 |
137 | /**
138 | * Gets the inverted String equivalent of the generated shade
139 | * @return String value of the shade
140 | */
141 | public String generateString() {
142 | return String.format("#%06X", 0xFFFFFF & generate());
143 | }
144 |
145 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/takeoffandroid/appintroanimation/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.takeoffandroid.appintroanimation;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.drawable.Drawable;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.support.v4.view.PagerAdapter;
9 | import android.support.v4.view.ViewPager;
10 | import android.support.v7.app.AppCompatActivity;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.view.Window;
14 | import android.view.WindowManager;
15 | import android.widget.ImageView;
16 | import android.widget.RelativeLayout;
17 | import android.widget.TextView;
18 |
19 |
20 | public class MainActivity extends AppCompatActivity{
21 |
22 | private static final String SAVING_STATE_SLIDER_ANIMATION = "SliderAnimationSavingState";
23 | private boolean isSliderAnimation = false;
24 |
25 | @Override
26 | protected void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 |
29 | Window window = getWindow();
30 | window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
31 | setContentView(R.layout.activity_main);
32 |
33 | ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
34 |
35 | viewPager.setAdapter(new ViewPagerAdapter(R.array.icons, R.array.titles, R.array.hints));
36 |
37 | CirclePageIndicator mIndicator = (CirclePageIndicator) findViewById(R.id.indicator);
38 | mIndicator.setViewPager(viewPager);
39 |
40 |
41 |
42 | viewPager.setPageTransformer(true, new CustomPageTransformer());
43 |
44 | viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
45 | @Override
46 | public void onPageScrolled(final int position, float positionOffset, int positionOffsetPixels) {
47 |
48 | View landingBGView = findViewById(R.id.landing_backgrond);
49 | int colorBg[] = getResources().getIntArray(R.array.landing_bg);
50 |
51 |
52 | ColorShades shades = new ColorShades();
53 | shades.setFromColor(colorBg[position % colorBg.length])
54 | .setToColor(colorBg[(position + 1) % colorBg.length])
55 | .setShade(positionOffset);
56 |
57 | landingBGView.setBackgroundColor(shades.generate());
58 |
59 | }
60 |
61 | public void onPageSelected(int position) {
62 |
63 | }
64 |
65 | public void onPageScrollStateChanged(int state) {
66 | }
67 | });
68 |
69 |
70 | }
71 |
72 | public class ViewPagerAdapter extends PagerAdapter {
73 |
74 | private int iconResId, titleArrayResId, hintArrayResId;
75 |
76 | public ViewPagerAdapter(int iconResId, int titleArrayResId, int hintArrayResId) {
77 |
78 | this.iconResId = iconResId;
79 | this.titleArrayResId = titleArrayResId;
80 | this.hintArrayResId = hintArrayResId;
81 | }
82 |
83 | @Override
84 | public int getCount() {
85 | return getResources().getIntArray(iconResId).length;
86 | }
87 |
88 | @Override
89 | public boolean isViewFromObject(View view, Object object) {
90 | return view == object;
91 | }
92 |
93 | @Override
94 | public Object instantiateItem(ViewGroup container, int position) {
95 |
96 | Drawable icon = getResources().obtainTypedArray(iconResId).getDrawable(position);
97 | String title = getResources().getStringArray(titleArrayResId)[position];
98 | String hint = getResources().getStringArray(hintArrayResId)[position];
99 |
100 |
101 | View itemView = getLayoutInflater().inflate(R.layout.viewpager_item, container, false);
102 |
103 |
104 | ImageView iconView = (ImageView) itemView.findViewById(R.id.landing_img_slide);
105 | TextView titleView = (TextView)itemView.findViewById(R.id.landing_txt_title);
106 | TextView hintView = (TextView)itemView.findViewById(R.id.landing_txt_hint);
107 |
108 |
109 | iconView.setImageDrawable(icon);
110 | titleView.setText(title);
111 | hintView.setText(hint);
112 |
113 | container.addView(itemView);
114 |
115 | return itemView;
116 | }
117 |
118 | @Override
119 | public void destroyItem(ViewGroup container, int position, Object object) {
120 | container.removeView((RelativeLayout) object);
121 |
122 | }
123 | }
124 |
125 | public class CustomPageTransformer implements ViewPager.PageTransformer {
126 |
127 |
128 | public void transformPage(View view, float position) {
129 | int pageWidth = view.getWidth();
130 |
131 | View imageView = view.findViewById(R.id.landing_img_slide);
132 | View contentView = view.findViewById(R.id.landing_txt_hint);
133 | View txt_title = view.findViewById(R.id.landing_txt_title);
134 |
135 | if (position < -1) { // [-Infinity,-1)
136 | // This page is way off-screen to the left
137 | } else if (position <= 0) { // [-1,0]
138 | // This page is moving out to the left
139 |
140 | // Counteract the default swipe
141 | setTranslationX(view,pageWidth * -position);
142 | if (contentView != null) {
143 | // But swipe the contentView
144 | setTranslationX(contentView,pageWidth * position);
145 | setTranslationX(txt_title,pageWidth * position);
146 |
147 | setAlpha(contentView,1 + position);
148 | setAlpha(txt_title,1 + position);
149 | }
150 |
151 | if (imageView != null) {
152 | // Fade the image in
153 | setAlpha(imageView,1 + position);
154 | }
155 |
156 | } else if (position <= 1) { // (0,1]
157 | // This page is moving in from the right
158 |
159 | // Counteract the default swipe
160 | setTranslationX(view, pageWidth * -position);
161 | if (contentView != null) {
162 | // But swipe the contentView
163 | setTranslationX(contentView,pageWidth * position);
164 | setTranslationX(txt_title,pageWidth * position);
165 |
166 | setAlpha(contentView, 1 - position);
167 | setAlpha(txt_title, 1 - position);
168 |
169 | }
170 | if (imageView != null) {
171 | // Fade the image out
172 | setAlpha(imageView,1 - position);
173 | }
174 |
175 | }
176 | }
177 | }
178 |
179 | /**
180 | * Sets the alpha for the view. The alpha will be applied only if the running android device OS is greater than honeycomb.
181 | * @param view - view to which alpha to be applied.
182 | * @param alpha - alpha value.
183 | */
184 | private void setAlpha(View view, float alpha) {
185 |
186 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && ! isSliderAnimation) {
187 | view.setAlpha(alpha);
188 | }
189 | }
190 |
191 | /**
192 | * Sets the translationX for the view. The translation value will be applied only if the running android device OS is greater than honeycomb.
193 | * @param view - view to which alpha to be applied.
194 | * @param translationX - translationX value.
195 | */
196 | private void setTranslationX(View view, float translationX) {
197 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && ! isSliderAnimation) {
198 | view.setTranslationX(translationX);
199 | }
200 | }
201 |
202 | public void onSaveInstanceState(Bundle outstate) {
203 |
204 | if(outstate != null) {
205 | outstate.putBoolean(SAVING_STATE_SLIDER_ANIMATION,isSliderAnimation);
206 | }
207 |
208 | super.onSaveInstanceState(outstate);
209 | }
210 |
211 | public void onRestoreInstanceState(Bundle inState) {
212 |
213 | if(inState != null) {
214 | isSliderAnimation = inState.getBoolean(SAVING_STATE_SLIDER_ANIMATION,false);
215 | }
216 | super.onRestoreInstanceState(inState);
217 |
218 | }
219 | }
220 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/drawable/calendar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/drawable/email.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_rectangle_semi_transparent.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shopping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/drawable/shopping.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/socialnetwork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/drawable/socialnetwork.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/viewpager_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
21 |
22 |
32 |
33 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-hdpi/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 10sp
7 | 16sp
8 | 18sp
9 | 20sp
10 | 12sp
11 | 10sp
12 | 14sp
13 | 180dp
14 | 5dp
15 | 10dp
16 | 15dp
17 | 20dp
18 | 25dp
19 | 30dp
20 | 35dp
21 | 40dp
22 | 50dp
23 | 60dp
24 | 48.65dip
25 | 70dp
26 | 80dp
27 | 90dp
28 | 101.25dip
29 |
30 |
31 |
32 | 200dp
33 | 4.5dp
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values-large-mdpi/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 16sp
6 | 26sp
7 | 30sp
8 | 33sp
9 | 20sp
10 | 16sp
11 | 23sp
12 | 300dp
13 | 8dp
14 | 16dp
15 | 25dp
16 | 33dp
17 | 41dp
18 | 50dp
19 | 58dp
20 | 66.5dip
21 | 83dp
22 | 100dp
23 | 81dip
24 | 116.6dip
25 | 133.3dip
26 | 150dp
27 | 168.75dip
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/values-mdpi/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 10sp
7 | 16sp
8 | 18sp
9 | 20sp
10 | 12sp
11 | 10sp
12 | 14sp
13 | 180dp
14 | 5dp
15 | 10dp
16 | 15dp
17 | 20dp
18 | 25dp
19 | 30dp
20 | 35dp
21 | 40dp
22 | 50dp
23 | 60dp
24 | 48.65dip
25 | 70dp
26 | 80dp
27 | 90dp
28 | 101.25dip
29 |
30 |
31 |
32 |
33 | 200dp
34 | 4.5dp
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | - @color/light_green
6 | - @color/light_purple
7 | - @color/light_orange
8 | - @color/light_cyan
9 |
10 |
11 |
12 |
13 | - @drawable/email
14 | - @drawable/calendar
15 | - @drawable/shopping
16 | - @drawable/socialnetwork
17 |
18 |
19 |
20 |
21 |
22 | - @string/email
23 | - @string/calender
24 | - @string/shopping
25 | - @string/social_network
26 |
27 |
28 |
29 |
30 |
31 | - @string/email_hint
32 | - @string/calender_hint
33 | - @string/shopping_hint
34 | - @string/social_network_hint
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #3eb74e
5 | #8c61b3
6 | #ffb500
7 | #00BCD4
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 8dp
6 | 2dp
7 | 10dp
8 | 5dp
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AppIntroAnimation
3 |
4 | Hello world!
5 | Settings
6 |
7 | EMAIL
8 | CALENDAR
9 | SHOPPING
10 | SOCIAL NETWORK
11 |
12 |
13 | A system for sending and receiving messages electronically over a computer network.
14 | Note all your special occasions in calendar and keep them in your finger tips
15 | Shop and get offers, promo codes and discounts on your future purchase.
16 | Stay connected with your friends, colleagues and family globally
17 | SKIP
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/vpi__attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
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 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/app/src/main/res/values/vpi__colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | #ff000000
19 | #fff3f3f3
20 | @color/vpi__background_holo_light
21 | @color/vpi__background_holo_dark
22 | #ff4c4c4c
23 | #ffb2b2b2
24 | @color/vpi__bright_foreground_holo_light
25 | @color/vpi__bright_foreground_holo_dark
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/vpi__defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | true
19 | #FFFFFFFF
20 | #40FFFFFF
21 | 0
22 | 3dp
23 | false
24 | #40FFFFFF
25 | 1dp
26 |
27 |
--------------------------------------------------------------------------------
/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/sharish/AppIntroAnimation/8c96cbf6e79e794d5e6ce1f7c7b4c6ac6d3bfc42/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 |
--------------------------------------------------------------------------------