Skip to content

Commit

Permalink
see 11/30 log
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankj committed Nov 30, 2017
1 parent b4e42b4 commit 2847e5a
Show file tree
Hide file tree
Showing 98 changed files with 1,288 additions and 1,286 deletions.
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png

[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.9.8-brightgreen.svg
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.9.9-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode

[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If this ptoject helps you a lot, and you would like to support this ptoject's fu

[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png

[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.9.8-brightgreen.svg
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.9.9-brightgreen.svg
[auc]: https://github.com/Blankj/AndroidUtilCode

[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies {
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakcanary_version"

// implementation 'com.blankj:utilcode:1.9.8'
// implementation 'com.blankj:utilcode:1.9.9'
}


2 changes: 1 addition & 1 deletion app/src/main/java/com/blankj/androidutilcode/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public class Config {
CACHE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath();
TEST_APK_PATH = CACHE_PATH + FILE_SEP + "test_install.apk";
}
}
}
20 changes: 10 additions & 10 deletions app/src/main/java/com/blankj/androidutilcode/UtilsApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/12
* desc : 工具类测试App
* desc : 工具类测试 App
* </pre>
*/
public class UtilsApp extends BaseApplication {
Expand Down Expand Up @@ -51,19 +51,19 @@ private void initLeakCanary() {
// init it in ur application
public void initLog() {
LogUtils.Config config = LogUtils.getConfig()
.setLogSwitch(BuildConfig.DEBUG)// 设置log总开关,包括输出到控制台和文件,默认开
.setLogSwitch(BuildConfig.DEBUG)// 设置 log 总开关,包括输出到控制台和文件,默认开
.setConsoleSwitch(BuildConfig.DEBUG)// 设置是否输出到控制台开关,默认开
.setGlobalTag(null)// 设置log全局标签,默认为空
// 当全局标签不为空时,我们输出的log全部为该tag
// 为空时,如果传入的tag为空那就显示类名,否则显示tag
.setLogHeadSwitch(true)// 设置log头信息开关,默认为开
.setLog2FileSwitch(false)// 打印log时是否存到文件的开关,默认关
.setGlobalTag(null)// 设置 log 全局标签,默认为空
// 当全局标签不为空时,我们输出的 log 全部为该 tag
// 为空时,如果传入的 tag 为空那就显示类名,否则显示 tag
.setLogHeadSwitch(true)// 设置 log 头信息开关,默认为开
.setLog2FileSwitch(false)// 打印 log 时是否存到文件的开关,默认关
.setDir("")// 当自定义路径为空时,写入应用的/cache/log/目录中
.setFilePrefix("")// 当文件前缀为空时,默认为"util",即写入文件为"util-MM-dd.txt"
.setBorderSwitch(true)// 输出日志是否带边框开关,默认开
.setConsoleFilter(LogUtils.V)// log的控制台过滤器,和logcat过滤器同理,默认Verbose
.setFileFilter(LogUtils.V)// log文件过滤器,和logcat过滤器同理,默认Verbose
.setStackDeep(1);// log栈深度,默认为1
.setConsoleFilter(LogUtils.V)// log 的控制台过滤器,和 logcat 过滤器同理,默认 Verbose
.setFileFilter(LogUtils.V)// log 文件过滤器,和 logcat 过滤器同理,默认 Verbose
.setStackDeep(1);// log 栈深度,默认为 1
LogUtils.d(config.toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/24
* desc : Activity基类
* desc : Activity 基类
* </pre>
*/
public abstract class BaseActivity extends AppCompatActivity
implements IBaseView {

/**
* 当前Activity渲染的视图View
* 当前 Activity 渲染的视图 View
*/
protected View contentView;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/03/30
* desc : 基类App
* desc : 基类 App
* </pre>
*/
public class BaseApplication extends Application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/06/27
* desc : DrawerActivity基类
* desc : DrawerActivity 基类
* </pre>
*/
public abstract class BaseBackActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/06/27
* desc : DrawerActivity基类
* desc : DrawerActivity 基类
* </pre>
*/
public abstract class BaseDrawerActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/03/28
* desc : Fragment-v4基类
* desc : Fragment-v4 基类
* </pre>
*/
public abstract class BaseFragment extends Fragment
Expand All @@ -24,7 +24,7 @@ public abstract class BaseFragment extends Fragment

private static final String STATE_SAVE_IS_HIDDEN = "STATE_SAVE_IS_HIDDEN";
/**
* 当前Activity渲染的视图View
* 当前 Activity 渲染的视图 View
*/
protected View contentView;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ interface IBaseView extends View.OnClickListener {
/**
* 初始化数据
*
* @param bundle 传递过来的bundle
* @param bundle 传递过来的 bundle
*/
void initData(final Bundle bundle);

/**
* 绑定布局
*
* @return 布局Id
* @return 布局 Id
*/
int bindLayout();

/**
* 初始化view
* 初始化 view
*/
void initView(final Bundle savedInstanceState, final View view);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : Activity工具类Demo
* desc : Activity 工具类 Demo
* </pre>
*/
public class ActivityActivity extends BaseBackActivity {
Expand Down Expand Up @@ -270,4 +270,4 @@ private Bundle getOption(int type) {
.toBundle();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : Activity工具类Demo
* desc : Activity 工具类 Demo
* </pre>
*/
public class SubActivityActivity extends BaseBackActivity {
Expand Down Expand Up @@ -62,4 +62,4 @@ public void onBackPressed() {
super.onBackPressed();
ActivityCompat.finishAfterTransition(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : App工具类Demo
* desc : App 工具类 Demo
* </pre>
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarActivity extends BaseBackActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/10/13
* desc : Activity工具类Demo
* desc : Activity 工具类 Demo
* </pre>
*/
public class BarNavActivity extends BaseBackActivity {
Expand Down Expand Up @@ -61,4 +61,4 @@ public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
BarUtils.hideNavBar(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusAlphaActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/07/01
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusAlphaFragment extends BaseFragment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusColorActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/07/01
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusColorFragment extends BaseFragment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusDrawerActivity extends BaseDrawerActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusFragmentActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusImageViewActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/07/01
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusImageViewFragment extends BaseFragment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/05/27
* desc : Bar工具类Demo
* desc : Bar 工具类 Demo
* </pre>
*/
public class BarStatusSwipeBackActivity extends BaseActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/09/29
* desc : Clean工具类Demo
* desc : Clean 工具类 Demo
* </pre>
*/
public class CleanActivity extends BaseBackActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/09/27
* desc : Device工具类Demo
* desc : Device 工具类 Demo
* </pre>
*/
public class DeviceActivity extends BaseBackActivity {
Expand Down Expand Up @@ -75,4 +75,4 @@ public void onWidgetClick(View view) {
break;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 17/02/01
* desc : Fragment工具类Demo
* desc : Fragment 工具类 Demo
* </pre>
*/
public class FragmentActivity extends BaseActivity {
Expand Down Expand Up @@ -111,4 +111,4 @@ public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistent
super.onSaveInstanceState(outState, outPersistentState);
outState.putInt("curIndex", curIndex);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/09/26
* desc : Image工具类Demo
* desc : Image 工具类 Demo
* </pre>
*/
public class ImageActivity extends BaseBackActivity {
Expand Down Expand Up @@ -101,4 +101,4 @@ public void onWidgetClick(View view) {
break;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2016/09/27
* desc : Keyboard工具类Demo
* desc : Keyboard 工具类 Demo
* </pre>
*/
public class KeyboardActivity extends BaseBackActivity {
Expand Down Expand Up @@ -94,7 +94,7 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
return super.dispatchTouchEvent(ev);
}

// 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
// 根据 EditText 所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private boolean isShouldHideKeyboard(View v, MotionEvent event) {
if (v != null && (v instanceof EditText)) {
int[] l = {0, 0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* author: Blankj
* blog : http://blankj.com
* time : 2017/03/22
* desc : Log工具类Demo
* desc : Log 工具类 Demo
* </pre>
*/
public class LogActivity extends BaseBackActivity {
Expand Down Expand Up @@ -270,4 +270,4 @@ protected void onDestroy() {
UtilsApp.getInstance().initLog();
super.onDestroy();
}
}
}
Loading

0 comments on commit 2847e5a

Please sign in to comment.