美文网首页
CV大法 - 常用记录

CV大法 - 常用记录

作者: whhccc | 来源:发表于2018-05-14 11:06 被阅读0次
  • android studio中 logcat日志过多,不能显示完全,分行显示方法
    public static void log(String TAG, String msg) {
        int beginIndex = 0;
        int max = 4000;
        String sub;
        while (beginIndex < msg.length()) {
            if (msg.length() <= beginIndex + max) {
                sub = msg.substring(beginIndex);
            } else {
                sub = msg.substring(beginIndex, beginIndex + max);
            }
            beginIndex += max;
            Log.e(TAG, sub);
        }
        Log.e(TAG, "\n");
    }

相关文章

网友评论

      本文标题:CV大法 - 常用记录

      本文链接:https://www.haomeiwen.com/subject/cfyddftx.html