Skip to content

Instantly share code, notes, and snippets.

@ngallazzi
Created February 4, 2022 14:29
Show Gist options
  • Save ngallazzi/7b377c90199b3b65eeaf37aafd5ac9d4 to your computer and use it in GitHub Desktop.
Save ngallazzi/7b377c90199b3b65eeaf37aafd5ac9d4 to your computer and use it in GitHub Desktop.
// Both functions print something
private fun printInvoiceHeader(header: InvoiceHeader) {
binding.tvInvoicePreview.text = header.toString()
}
private fun printCustomerDetails(customer: Customer) {
var customerDetails = ""
customerDetails += "CUSTOMER\n"
customerDetails += "First Name: ${customer.firstName}\nLast Name: ${customer.lastName}\n"
binding.tvInvoicePreview.append("$customerDetails\n")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment