update demo method

This commit is contained in:
Jay 2017-08-23 23:30:11 +08:00
parent 1c27469f0f
commit e4ee08c75e

View File

@ -68,7 +68,15 @@ class MainActivity : Activity() {
btn.setOnClickListener { btn.setOnClickListener {
val txt: String = intxt.text.toString() val txt: String = intxt.text.toString()
ble?.setAlign(PrinterBle.ALIGN_CENTER)?.addText(txt) ble?.setSize(2,1)
ble?.setAlign(PrinterBle.ALIGN_CENTER)
ble?.addTextln("MTFoS Shop")
ble?.resetSize()
ble?.setAlign(PrinterBle.ALIGN_RIGHT)
ble?.addTextln("MTFoS Shop")
ble?.addHR()
ble?.setAlign(PrinterBle.ALIGN_LEFT)
ble?.addText(txt)
ble?.sendQueue() ble?.sendQueue()
} }