addHR func before addNewLine

This commit is contained in:
Jay
2017-09-01 20:28:26 +08:00
parent 74159a1b47
commit 41d7a1c4a3
4 changed files with 4 additions and 3 deletions
@@ -51,7 +51,7 @@ class MainActivity : Activity() {
connectBtn.isEnabled = true
disconnectBtn.isEnabled = false
ble = PrinterBle(this@MainActivity, "43:43:A1:12:1F:AC", "dd535b71-8f05-4e30-beb0-6fa7ea3dfc3e", "00000001-8f05-4e30-beb0-6fa7ea3dfc3e")
ble = PrinterBle(this@MainActivity, "B8:27:EB:21:C2:1A", "dd535b71-8f05-4e30-beb0-6fa7ea3dfc3e", "00000001-8f05-4e30-beb0-6fa7ea3dfc3e")
ble?.setOnStateChangeListener {
System.out.println("Now State is >>>> " + it)
@@ -418,6 +418,7 @@ public class PrinterBle {
public PrinterBle addHR() {
int align = this.lastAlign;
setAlign(ALIGN_CENTER);
textNewLine();
addTextln(StringUtils.repeat('-', 20));
setAlign(align);
return this;