提交 41fb32b7 编写于 作者: Z ZhaoKaiQiang

添加折行判断

上级 62d1cbc7
......@@ -19,7 +19,7 @@ public class MainActivity extends AppCompatActivity {
private static final String LOG_MSG = "KLog is a so cool Log Tool!";
private static final String TAG = "KLog";
private static final String URL = "http://www.w3school.com.cn/example/xmle/note.xml";
private static final String URL_XML = "https://raw.githubusercontent.com/ZhaoKaiQiang/KLog/master/app/src/main/AndroidManifest.xml";
private static String XML = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><!-- Copyright w3school.com.cn --><note><to>George</to><from>John</from><heading>Reminder</heading><body>Don't forget the meeting!</body></note>";
private static String JSON;
private static String JSON_LONG;
......@@ -101,7 +101,7 @@ public class MainActivity extends AppCompatActivity {
}
public void logWithXmlFromNet(View view) {
httpClient.get(this, URL, new TextHttpResponseHandler() {
httpClient.get(this, URL_XML, new TextHttpResponseHandler() {
@Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
KLog.e(responseString);
......
......@@ -312,6 +312,6 @@ public class KLog {
}
private static boolean isEmpty(String line) {
return TextUtils.isEmpty(line) || line.equals("\n") || line.equals("\r\n") || line.equals("\t");
return TextUtils.isEmpty(line) || line.equals("\n") || line.equals("\t")||TextUtils.isEmpty(line.trim());
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册