├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── kotlinc.xml
├── misc.xml
├── modules.xml
├── qaplug_profiles.xml
└── runConfigurations.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── center
│ │ └── testviewpager
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── center
│ │ │ └── testviewpager
│ │ │ ├── MainActivity.java
│ │ │ └── MyApplication.java
│ └── res
│ │ ├── drawable
│ │ ├── splash_iv_first.png
│ │ ├── splash_iv_forth.png
│ │ ├── splash_iv_second.png
│ │ └── splash_iv_third.png
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── layout_app_intro.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── arrays.xml
│ │ ├── colors-material.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── center
│ └── testviewpager
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── 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 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.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/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.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 |
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 | 1.8
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/qaplug_profiles.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 |
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 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
888 |
889 |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
900 |
901 |
902 |
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
917 |
918 |
919 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TestViewpager-
2 | Android引导页根据滑动渐变背景色
3 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "com.center.testviewpager"
8 | minSdkVersion 14
9 | targetSdkVersion 25
10 | versionCode 2
11 | versionName "1.1"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | multiDexEnabled true
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | compile fileTree(dir: 'libs', include: ['*.jar'])
25 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
26 | exclude group: 'com.android.support', module: 'support-annotations'
27 | })
28 | testCompile 'junit:junit:4.12'
29 | compile 'com.android.support:support-v4:25.1.0'
30 | //沉浸式状态栏
31 | compile 'com.jaeger.statusbaruitl:library:1.3.6'
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/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 D:\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 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/center/testviewpager/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.center.testviewpager;
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 | {
20 | @Test
21 | public void useAppContext() throws Exception
22 | {
23 | // Context of the app under test.
24 | Context appContext = InstrumentationRegistry.getTargetContext();
25 |
26 | assertEquals("com.center.testviewpager", appContext.getPackageName());
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/center/testviewpager/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.center.testviewpager;
2 |
3 | import android.animation.ArgbEvaluator;
4 | import android.app.Activity;
5 | import android.content.res.TypedArray;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.support.v4.content.ContextCompat;
9 | import android.support.v4.view.PagerAdapter;
10 | import android.support.v4.view.ViewPager;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.view.WindowManager;
14 | import android.widget.Button;
15 | import android.widget.ImageView;
16 | import android.widget.RelativeLayout;
17 | import android.widget.TextView;
18 |
19 | import com.jaeger.library.StatusBarUtil;
20 |
21 | public class MainActivity extends Activity
22 | {
23 |
24 | private RelativeLayout mRootLayout;
25 |
26 | private ViewPager mViewPager;
27 |
28 | private int colorBg[];
29 |
30 | private ArgbEvaluator mArgbEvaluator;
31 |
32 | private int barAlpha = 0;
33 |
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState)
36 | {
37 | super.onCreate(savedInstanceState);
38 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT)
39 | {
40 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
41 | }
42 | setContentView(R.layout.activity_main);
43 | mRootLayout = (RelativeLayout)findViewById(R.id.rl_root);
44 | mViewPager = (ViewPager)findViewById(R.id.viewpager);
45 | StatusBarUtil.setColor(this, ContextCompat.getColor(this, R.color.light_green_500), barAlpha);
46 | mArgbEvaluator = new ArgbEvaluator();
47 | colorBg = getResources().getIntArray(R.array.splash_bg);
48 | final IntroPager introPager = new IntroPager(R.array.splash_icon, R.array.splash_desc);
49 | mViewPager.setAdapter(introPager);
50 | mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener()
51 | {
52 | @Override
53 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
54 | {
55 | int color = (int)mArgbEvaluator.evaluate(positionOffset, colorBg[position % colorBg.length],
56 | colorBg[(position + 1) % colorBg.length]);
57 | StatusBarUtil.setColor(MainActivity.this, color, barAlpha);
58 | mRootLayout.setBackgroundColor(color);
59 | }
60 |
61 | @Override
62 | public void onPageSelected(int position)
63 | {
64 |
65 | }
66 |
67 | @Override
68 | public void onPageScrollStateChanged(int state)
69 | {
70 |
71 | }
72 |
73 | });
74 |
75 | }
76 |
77 | private class IntroPager extends PagerAdapter
78 | {
79 |
80 | private String[] mDescs;
81 |
82 | private TypedArray mIcons;
83 |
84 | public IntroPager(int icoImage, int des)
85 | {
86 | mDescs = getResources().getStringArray(des);
87 | mIcons = getResources().obtainTypedArray(icoImage);
88 | }
89 |
90 | @Override
91 | public int getCount()
92 | {
93 | return mIcons.length();
94 | }
95 |
96 | @Override
97 | public boolean isViewFromObject(View view, Object object)
98 | {
99 | return view == object;
100 | }
101 |
102 | @Override
103 | public Object instantiateItem(ViewGroup container, int position)
104 | {
105 | View itemLayout = getLayoutInflater().inflate(R.layout.layout_app_intro, container, false);
106 | ImageView mImage = (ImageView)itemLayout.findViewById(R.id.iv_img);
107 | TextView mTextView = (TextView)itemLayout.findViewById(R.id.tv_desc);
108 | Button mButton = (Button)itemLayout.findViewById(R.id.btn_launch);
109 | mImage.setImageResource(mIcons.getResourceId(position, 0));
110 | mTextView.setText(mDescs[position]);
111 | if (position == getCount() - 1)
112 | {
113 | mButton.setVisibility(View.VISIBLE);
114 | }
115 | else
116 | {
117 | mButton.setVisibility(View.GONE);
118 | }
119 | container.addView(itemLayout);
120 | return itemLayout;
121 | }
122 |
123 | @Override
124 | public void destroyItem(ViewGroup container, int position, Object object)
125 | {
126 | container.removeView((View)object);
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/app/src/main/java/com/center/testviewpager/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.center.testviewpager;
2 |
3 | import android.app.Application;
4 |
5 | /**
6 | * Created by Android-center on 2017/3/23.
7 | */
8 |
9 | public class MyApplication extends Application
10 | {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/splash_iv_first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/drawable/splash_iv_first.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/splash_iv_forth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/drawable/splash_iv_forth.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/splash_iv_second.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/drawable/splash_iv_second.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/splash_iv_third.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/drawable/splash_iv_third.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_app_intro.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
17 |
18 |
19 |
23 |
24 |
33 |
34 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/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 | - 觉得行,来个肯定吧
6 | - 有不好的地方欢迎大神指点
7 | - 记得分享哟
8 |
9 |
10 | - @drawable/splash_iv_first
11 | - @drawable/splash_iv_second
12 | - @drawable/splash_iv_third
13 | - @drawable/splash_iv_forth
14 |
15 |
16 | - @color/light_green_500
17 | - @color/amber_500
18 | - @color/red_400
19 | - @color/blue_500
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors-material.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #fde0dc
5 |
6 | #f9bdbb
7 |
8 | #f69988
9 |
10 | #f36c60
11 |
12 | #e84e40
13 |
14 | #e51c23
15 |
16 | #dd191d
17 |
18 | #d01716
19 |
20 | #c41411
21 |
22 | #b0120a
23 |
24 | #ff7997
25 |
26 | #ff5177
27 |
28 | #ff2d6f
29 |
30 | #e00032
31 |
32 |
33 |
34 | #fce4ec
35 |
36 | #f8bbd0
37 |
38 | #f48fb1
39 |
40 | #f06292
41 |
42 | #ec407a
43 |
44 | #e91e63
45 |
46 | #d81b60
47 |
48 | #c2185b
49 |
50 | #ad1457
51 |
52 | #880e4f
53 |
54 | #ff80ab
55 |
56 | #ff4081
57 |
58 | #f50057
59 |
60 | #c51162
61 |
62 |
63 |
64 | #f3e5f5
65 |
66 | #e1bee7
67 |
68 | #ce93d8
69 |
70 | #ba68c8
71 |
72 | #ab47bc
73 |
74 | #9c27b0
75 |
76 | #8e24aa
77 |
78 | #7b1fa2
79 |
80 | #6a1b9a
81 |
82 | #4a148c
83 |
84 | #ea80fc
85 |
86 | #e040fb
87 |
88 | #d500f9
89 |
90 | #aa00ff
91 |
92 |
93 |
94 | #ede7f6
95 |
96 | #d1c4e9
97 |
98 | #b39ddb
99 |
100 | #9575cd
101 |
102 | #7e57c2
103 |
104 | #673ab7
105 |
106 | #5e35b1
107 |
108 | #512da8
109 |
110 | #4527a0
111 |
112 | #311b92
113 |
114 | #b388ff
115 |
116 | #7c4dff
117 |
118 | #651fff
119 |
120 | #6200ea
121 |
122 |
123 |
124 | #e8eaf6
125 |
126 | #c5cae9
127 |
128 | #9fa8da
129 |
130 | #7986cb
131 |
132 | #5c6bc0
133 |
134 | #3f51b5
135 |
136 | #3949ab
137 |
138 | #303f9f
139 |
140 | #283593
141 |
142 | #1a237e
143 |
144 | #8c9eff
145 |
146 | #536dfe
147 |
148 | #3d5afe
149 |
150 | #304ffe
151 |
152 |
153 |
154 | #e7e9fd
155 |
156 | #d0d9ff
157 |
158 | #afbfff
159 |
160 | #91a7ff
161 |
162 | #738ffe
163 |
164 | #5677fc
165 |
166 | #4e6cef
167 |
168 | #455ede
169 |
170 | #3b50ce
171 |
172 | #2a36b1
173 |
174 | #a6baff
175 |
176 | #6889ff
177 |
178 | #4d73ff
179 |
180 | #4d69ff
181 |
182 |
183 |
184 | #e1f5fe
185 |
186 | #b3e5fc
187 |
188 | #81d4fa
189 |
190 | #4fc3f7
191 |
192 | #29b6f6
193 |
194 | #03a9f4
195 |
196 | #039be5
197 |
198 | #0288d1
199 |
200 | #0277bd
201 |
202 | #01579b
203 |
204 | #80d8ff
205 |
206 | #40c4ff
207 |
208 | #00b0ff
209 |
210 | #0091ea
211 |
212 |
213 |
214 | #e0f7fa
215 |
216 | #b2ebf2
217 |
218 | #80deea
219 |
220 | #4dd0e1
221 |
222 | #26c6da
223 |
224 | #00bcd4
225 |
226 | #00acc1
227 |
228 | #0097a7
229 |
230 | #00838f
231 |
232 | #006064
233 |
234 | #84ffff
235 |
236 | #18ffff
237 |
238 | #00e5ff
239 |
240 | #00b8d4
241 |
242 |
243 |
244 | #e0f2f1
245 |
246 | #b2dfdb
247 |
248 | #80cbc4
249 |
250 | #4db6ac
251 |
252 | #26a69a
253 |
254 | #009688
255 |
256 | #00897b
257 |
258 | #00796b
259 |
260 | #00695c
261 |
262 | #004d40
263 |
264 | #a7ffeb
265 |
266 | #64ffda
267 |
268 | #1de9b6
269 |
270 | #00bfa5
271 |
272 |
273 |
274 | #d0f8ce
275 |
276 | #a3e9a4
277 |
278 | #72d572
279 |
280 | #42bd41
281 |
282 | #2baf2b
283 |
284 | #259b24
285 |
286 | #0a8f08
287 |
288 | #0a7e07
289 |
290 | #056f00
291 |
292 | #0d5302
293 |
294 | #a2f78d
295 |
296 | #5af158
297 |
298 | #14e715
299 |
300 | #12c700
301 |
302 |
303 |
304 | #f1f8e9
305 |
306 | #dcedc8
307 |
308 | #c5e1a5
309 |
310 | #aed581
311 |
312 | #9ccc65
313 |
314 | #8bc34a
315 |
316 | #7cb342
317 |
318 | #689f38
319 |
320 | #558b2f
321 |
322 | #33691e
323 |
324 | #ccff90
325 |
326 | #b2ff59
327 |
328 | #76ff03
329 |
330 | #64dd17
331 |
332 |
333 |
334 | #f9fbe7
335 |
336 | #f0f4c3
337 |
338 | #e6ee9c
339 |
340 | #dce775
341 |
342 | #d4e157
343 |
344 | #cddc39
345 |
346 | #c0ca33
347 |
348 | #afb42b
349 |
350 | #9e9d24
351 |
352 | #827717
353 |
354 | #f4ff81
355 |
356 | #eeff41
357 |
358 | #c6ff00
359 |
360 | #aeea00
361 |
362 |
363 |
364 | #fffde7
365 |
366 | #fff9c4
367 |
368 | #fff59d
369 |
370 | #fff176
371 |
372 | #ffee58
373 |
374 | #ffeb3b
375 |
376 | #fdd835
377 |
378 | #fbc02d
379 |
380 | #f9a825
381 |
382 | #f57f17
383 |
384 | #ffff8d
385 |
386 | #ffff00
387 |
388 | #ffea00
389 |
390 | #ffd600
391 |
392 |
393 |
394 | #fff8e1
395 |
396 | #ffecb3
397 |
398 | #ffe082
399 |
400 | #ffd54f
401 |
402 | #ffca28
403 |
404 | #ffc107
405 |
406 | #ffb300
407 |
408 | #ffa000
409 |
410 | #ff8f00
411 |
412 | #ff6f00
413 |
414 | #ffe57f
415 |
416 | #ffd740
417 |
418 | #ffc400
419 |
420 | #ffab00
421 |
422 |
423 |
424 | #fff3e0
425 |
426 | #ffe0b2
427 |
428 | #ffcc80
429 |
430 | #ffb74d
431 |
432 | #ffa726
433 |
434 | #ff9800
435 |
436 | #fb8c00
437 |
438 | #f57c00
439 |
440 | #ef6c00
441 |
442 | #e65100
443 |
444 | #ffd180
445 |
446 | #ffab40
447 |
448 | #ff9100
449 |
450 | #ff6d00
451 |
452 |
453 |
454 | #fbe9e7
455 |
456 | #ffccbc
457 |
458 | #ffab91
459 |
460 | #ff8a65
461 |
462 | #ff7043
463 |
464 | #ff5722
465 |
466 | #f4511e
467 |
468 | #e64a19
469 |
470 | #d84315
471 |
472 | #bf360c
473 |
474 | #ff9e80
475 |
476 | #ff6e40
477 |
478 | #ff3d00
479 |
480 | #dd2c00
481 |
482 |
483 |
484 | #efebe9
485 |
486 | #d7ccc8
487 |
488 | #bcaaa4
489 |
490 | #a1887f
491 |
492 | #8d6e63
493 |
494 | #795548
495 |
496 | #6d4c41
497 |
498 | #5d4037
499 |
500 | #4e342e
501 |
502 | #3e2723
503 |
504 |
505 |
506 | #eceff1
507 |
508 | #cfd8dc
509 |
510 | #b0bec5
511 |
512 | #90a4ae
513 |
514 | #78909c
515 |
516 | #607d8b
517 |
518 | #546e7a
519 |
520 | #455a64
521 |
522 | #37474f
523 |
524 | #263238
525 |
526 |
527 |
528 | #fafafa
529 |
530 | #f5f5f5
531 |
532 | #eeeeee
533 |
534 | #e0e0e0
535 |
536 | #bdbdbd
537 |
538 | #9e9e9e
539 |
540 | #757575
541 |
542 | #616161
543 |
544 | #424242
545 |
546 | #212121
547 |
548 | #000000
549 |
550 | #ffffff
551 |
552 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TestViewPager
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/test/java/com/center/testviewpager/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.center.testviewpager;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest
13 | {
14 | @Test
15 | public void addition_isCorrect() throws Exception
16 | {
17 | assertEquals(4, 2 + 2);
18 | }
19 | }
--------------------------------------------------------------------------------
/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:2.3.0'
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 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/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 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/centerzx/TestViewpager-/89fd84ac5dddfb44f942b294fbac30320cf18779/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 23 11:31:27 CST 2017
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-3.3-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 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------