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

View File

@ -24,7 +24,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/BTDemo.iml" filepath="$PROJECT_DIR$/BTDemo.iml" />
<module fileurl="file://D:\Project\ble-android-demo\BTDemo.iml" filepath="D:\Project\ble-android-demo\BTDemo.iml" />
<module fileurl="file://$PROJECT_DIR$/BTDemo.iml" filepath="$PROJECT_DIR$/BTDemo.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
<module fileurl="file://$PROJECT_DIR$/ble-android-demo.iml" filepath="$PROJECT_DIR$/ble-android-demo.iml" />
</modules>

View File

@ -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)

View File

@ -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;