1111import android .widget .TextView ;
1212
1313import com .blankj .lib .base .BaseApplication ;
14+ import com .blankj .lib .base .BaseBackActivity ;
1415import com .blankj .utilcode .pkg .Config ;
1516import com .blankj .utilcode .pkg .R ;
16- import com .blankj .lib .base .BaseBackActivity ;
1717import com .blankj .utilcode .util .LogUtils ;
1818
1919import java .util .ArrayList ;
20+ import java .util .HashMap ;
21+ import java .util .Map ;
2022
2123
2224/**
@@ -41,14 +43,16 @@ public class LogActivity extends BaseBackActivity {
4143 private static final int UPDATE_CONSOLE_FILTER = 0x01 << 8 ;
4244 private static final int UPDATE_FILE_FILTER = 0x01 << 9 ;
4345
44- private static final String JSON = "{\" tools\" : [{ \" name\" :\" css format\" , \" site\" :\" http://tools.w3cschool.cn/code/css\" },{ \" name\" :\" JSON format\" , \" site\" :\" http://tools.w3cschool.cn/code/JSON\" },{ \" name\" :\" pwd check\" , \" site\" :\" http://tools.w3cschool.cn/password/my_password_safe\" }]}" ;
45- private static final String XML = "<books><book><author>Jack Herrington</author><title>PHP Hacks</title><publisher>O'Reilly</publisher></book><book><author>Jack Herrington</author><title>Podcasting Hacks</title><publisher>O'Reilly</publisher></book></books>" ;
46- private static final int [] ONE_D_ARRAY = new int []{1 , 2 , 3 };
47- private static final int [][] TWO_D_ARRAY = new int [][]{{1 , 2 , 3 }, {4 , 5 , 6 }, {7 , 8 , 9 }};
48- private static final Throwable THROWABLE = new NullPointerException ();
49- private static final Bundle BUNDLE = new Bundle ();
50- private static final Intent INTENT = new Intent ();
51- private static final ArrayList <String > LIST = new ArrayList <>();
46+ private static final String JSON = "{\" tools\" : [{ \" name\" :\" css format\" , \" site\" :\" http://tools.w3cschool.cn/code/css\" },{ \" name\" :\" JSON format\" , \" site\" :\" http://tools.w3cschool.cn/code/JSON\" },{ \" name\" :\" pwd check\" , \" site\" :\" http://tools.w3cschool.cn/password/my_password_safe\" }]}" ;
47+ private static final String XML = "<books><book><author>Jack Herrington</author><title>PHP Hacks</title><publisher>O'Reilly</publisher></book><book><author>Jack Herrington</author><title>Podcasting Hacks</title><publisher>O'Reilly</publisher></book></books>" ;
48+ private static final int [] ONE_D_ARRAY = new int []{1 , 2 , 3 };
49+ private static final int [][] TWO_D_ARRAY = new int [][]{{1 , 2 , 3 }, {4 , 5 , 6 }, {7 , 8 , 9 }};
50+ private static final Throwable THROWABLE = new NullPointerException ();
51+ private static final Bundle BUNDLE = new Bundle ();
52+ private static final Intent INTENT = new Intent ();
53+ private static final ArrayList <String > LIST = new ArrayList <>();
54+ private static final Map <String , String > MAP = new HashMap <>();
55+ private static final Object OBJECT = new Config ();
5256
5357 private static final String LONG_STR ;
5458
@@ -95,6 +99,9 @@ public class LogActivity extends BaseBackActivity {
9599 LIST .add ("hello" );
96100 LIST .add ("log" );
97101 LIST .add ("utils" );
102+
103+ MAP .put ("name" , "AndroidUtilCode" );
104+ MAP .put ("class" , "LogUtils" );
98105 }
99106
100107 private TextView tvAboutLog ;
@@ -169,6 +176,8 @@ public void initView(Bundle savedInstanceState, View contentView) {
169176 findViewById (R .id .btn_log_bundle ).setOnClickListener (this );
170177 findViewById (R .id .btn_log_intent ).setOnClickListener (this );
171178 findViewById (R .id .btn_log_array_list ).setOnClickListener (this );
179+ findViewById (R .id .btn_log_map ).setOnClickListener (this );
180+ findViewById (R .id .btn_log_object ).setOnClickListener (this );
172181 updateConfig (0 );
173182 }
174183
@@ -285,6 +294,12 @@ public void onWidgetClick(View view) {
285294 } else if (i1 == R .id .btn_log_array_list ) {
286295 LogUtils .e (LIST );
287296
297+ } else if (i1 == R .id .btn_log_map ) {
298+ LogUtils .e (MAP );
299+
300+ } else if (i1 == R .id .btn_log_object ) {
301+ LogUtils .e (OBJECT );
302+
288303 }
289304 }
290305
0 commit comments