File tree Expand file tree Collapse file tree 5 files changed +15
-7
lines changed
java/com/blankj/androidutilcode
utilcode/src/test/java/com/blankj/utilcode/utils Expand file tree Collapse file tree 5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ compile 'com.blankj:utilcode:1.3.4'
570
570
571
571
### How to use
572
572
```
573
- Utils.
573
+ Utils.init(context);
574
574
```
575
575
576
576
### Proguard
Original file line number Diff line number Diff line change @@ -565,6 +565,11 @@ Gradle:
565
565
compile 'com.blankj:utilcode:1.3.4'
566
566
```
567
567
568
+ ### How to use
569
+ ```
570
+ Utils.init(context);
571
+ ```
572
+
568
573
### Proguard
569
574
***
570
575
```
@@ -679,6 +684,9 @@ limitations under the License.
679
684
[ snackbar.java ] : https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/utils/SnackbarUtils.java
680
685
[ snackbar.demo ] : https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activities/SnackbarActivity.java
681
686
687
+ [ spannable.java ] : https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/utils/SpannableStringUtils.java
688
+ [ spannable.demo ] : https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activities/SpannableActivity.java
689
+
682
690
[ sp.java ] : https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/utils/SPUtils.java
683
691
[ sp.test ] : https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/utils/SPUtilsTest.java
684
692
Original file line number Diff line number Diff line change 44
44
<!-- process-->
45
45
<uses-permission android : name =" android.permission.KILL_BACKGROUND_PROCESSES" />
46
46
<application
47
- android : name =" .App "
47
+ android : name =" .UtilsApp "
48
48
android : allowBackup =" true"
49
49
android : icon =" @mipmap/ic_launcher"
50
50
android : label =" @string/my_app_name"
Original file line number Diff line number Diff line change 12
12
* author: Blankj
13
13
* blog : http://blankj.com
14
14
* time : 2016/10/12
15
- * desc : App
15
+ * desc : 工具类测试App
16
16
* </pre>
17
17
*/
18
- public class App extends Application {
18
+ public class UtilsApp extends Application {
19
19
20
- private static App appContext ;
20
+ private static UtilsApp appContext ;
21
21
22
- public static App getInstance () {
22
+ public static UtilsApp getInstance () {
23
23
return appContext ;
24
24
}
25
25
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public class TestUtils {
27
27
+ SEP + "src" + SEP + "test" + SEP + "res" + SEP ;
28
28
29
29
public static void init () {
30
- Utils .getContext () = RuntimeEnvironment .application ;
30
+ Utils .init ( RuntimeEnvironment .application ) ;
31
31
}
32
32
33
33
@ Test
You can’t perform that action at this time.
0 commit comments