1
// 设置Activity不允许横屏
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); /
2
在StringBuilder中插入换行符,输出到文本文档中的时候,使用
builder.append(logInfo.getDate()
+ "\r\n"
+ "系统启动成功!"
+ "\r\n"
+ "登录账号:"
+ logInfo.getLoginPerson()
+ "\r\n" + "\r\n");
3
在显示的时候,各个系统都可以使用的换行符可以使用
String new_line = System.getProperty("line.separator");
builder.append(logInfo.getDate()
+ new_line
+ "系统启动成功!"
+ new_line
+ "登录账号:"
+ logInfo.getLoginPerson()
+ new_line + new_line);