auto break in address
This commit is contained in:
parent
bb054c1b86
commit
948aba0a8a
@ -811,7 +811,7 @@ public abstract class BaseXPrint {
|
|||||||
if (receiptHeader == null || TextUtils.equals(receiptHeader, "") || receiptHeader.trim().isEmpty()) {
|
if (receiptHeader == null || TextUtils.equals(receiptHeader, "") || receiptHeader.trim().isEmpty()) {
|
||||||
receiptHeader = merchantName;
|
receiptHeader = merchantName;
|
||||||
}
|
}
|
||||||
if (TextUtils.equals(merchantAddress, "") || merchantAddress == null || merchantAddress.isEmpty()) {
|
if (merchantAddress == null || TextUtils.equals(merchantAddress, "") || merchantAddress.isEmpty()) {
|
||||||
merchantAddress = "";
|
merchantAddress = "";
|
||||||
} else {
|
} else {
|
||||||
merchantAddress = merchantAddress
|
merchantAddress = merchantAddress
|
||||||
@ -835,7 +835,9 @@ public abstract class BaseXPrint {
|
|||||||
// sunmiPrinterService.printTextWithFont(merchantName + "\n", "", 24, null);
|
// sunmiPrinterService.printTextWithFont(merchantName + "\n", "", 24, null);
|
||||||
sunmiPrinterService.sendRAWData(boldOff(), innerResultCallback);
|
sunmiPrinterService.sendRAWData(boldOff(), innerResultCallback);
|
||||||
sunmiPrinterService.setFontSize(textSize, innerResultCallback);
|
sunmiPrinterService.setFontSize(textSize, innerResultCallback);
|
||||||
sunmiPrinterService.printText(wrappedAddressText + "\n", innerResultCallback);
|
for (String addressLine : wrappedAddressText) {
|
||||||
|
sunmiPrinterService.printText(addressLine + "\n", innerResultCallback);
|
||||||
|
}
|
||||||
sunmiPrinterService.printText(merchantPhoneNo + "\n", innerResultCallback);
|
sunmiPrinterService.printText(merchantPhoneNo + "\n", innerResultCallback);
|
||||||
sunmiPrinterService.lineWrap(1, innerResultCallback);
|
sunmiPrinterService.lineWrap(1, innerResultCallback);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user