11# ActivityTaskView
2- ActivityTaskView is a float window that shows activity task stacks in a app,
3- monitors all activities' lifecycle.
2+
3+ ![ AcitivtyTask.png ] ( https://upload-images.jianshu.io/upload_images/1896166-3055e957eb03b6d4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240 )
44
55## Introduction
6+ [ 中文文档] ( https://www.jianshu.com/p/c34483bb5c0f )
7+
8+ ### New UI and Function
9+
10+ ![ ActivityTask.gif] ( https://upload-images.jianshu.io/upload_images/1896166-4a0425e42ae702c1.gif?imageMogr2/auto-orient/strip )
11+
12+ - Show fragment tree of an activity
13+ - Show lifecycle text behind Activity/Fragment
14+ - Float window auto attach to border
15+ - Tap float window to show tiny icon, and tap to show again
16+
17+ ** Define short name**
618
7- ### Colors of lifecycles
19+ Name | Short name
20+ -----|-----------
21+ Activity | A…
22+ Fragment | F…
23+ SaveInstanceState | SIS
824
9- - ![ #00000000 ] ( https://placehold.it/15/00000000/000000?text=+ ) onCreate
10- - ![ #33ff0000] ( https://placehold.it/15/33ff0000/000000?text=+ ) onStart
11- - ![ #ffff0000] ( https://placehold.it/15/ffff0000/000000?text=+ ) onResume
12- - ![ #ff000000] ( https://placehold.it/15/ff000000/000000?text=+ ) onPause
13- - ![ #33000000 ] ( https://placehold.it/15/33000000/000000?text=+ ) onStop
14- - ![ #00000000 ] ( https://placehold.it/15/00000000/000000?text=+ ) onDestroy
1525
1626### Use in demo(show different launch mode)
1727
@@ -31,27 +41,27 @@ monitors all activities' lifecycle.
3141![ dialogStyle.gif] ( http://upload-images.jianshu.io/upload_images/1896166-538d3d530f8cd0d6.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240 )
3242
3343## Usage
34- 1 ) Add dependence in module's build.gradle
35- > compile 'cc.rome753:activitytaskview:3.8.0'
44+ 1 . Install ActivityTaskView release apk, open it and grant window permission
3645
37- 2 ) Add system alert permission in AndroidManifest.xml
38- ```
39- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
40- ```
46+ https://github.com/rome753/ActivityTaskView/releases/tag/v4.1.0
47+
48+ 2 . Add ActivityTaskHelper.java file to you project
4149
42- 3 ) Init in application's onCreate()
50+ https://github.com/rome753/ActivityTaskView/blob/master/app/src/main/java/cc/rome753/demo/ActivityTaskHelper.java
51+
52+ 3 . Use ActivityTaskHelper in your application's onCreate()
4353```
44- @Override
45- public void onCreate() {
46- super.onCreate();
47- ActivityTask.init(this, BuildConfig.DEBUG);
48- // ActivityTask.setAutoHide(false); // optional
49- // ActivityTask.setInterval(500); // optional
50- // ActivityTask.setTextSize(10); // optional
51- }
54+ @Override
55+ public void onCreate() {
56+ super.onCreate();
57+
58+ if(BuildConfig.DEBUG) {
59+ new ActivityTaskHelper().init(this);
60+ }
61+ }
5262```
5363
54- > minSdkVersion 14
64+ 4 . Launch your app, and lifecycles will be showed in the float window.
5565
5666## License
5767 Apache License, Version 2.0
0 commit comments