diff --git a/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddProductActivity.kt b/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddProductActivity.kt index 09816e7..f7e3649 100644 --- a/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddProductActivity.kt +++ b/app/src/main/java/org/foxarmy/barcodescannerforemployees/activities/AddProductActivity.kt @@ -104,34 +104,6 @@ class AddProductActivity : AppCompatActivity() { update() } -// dateOfProductionSelectButton.setOnClickListener { -// val c = Calendar.getInstance() -// val year = c.get(Calendar.YEAR) -// val month = c.get(Calendar.MONTH) -// val day = c.get(Calendar.DAY_OF_MONTH) -// -// val dpd = DatePickerDialog(this, { _, y, m, d -> -// product!!.dateOfProduction = SimpleDateFormat("dd.MM.yyyy").parse("$d.${m+1}.$y")!!.time / 1000 -// update() -// }, year, month, day) -// -// dpd.show() -// } - -// expiryDateSelectButton.setOnClickListener { -// val c = Calendar.getInstance() -// val year = c.get(Calendar.YEAR) -// val month = c.get(Calendar.MONTH) -// val day = c.get(Calendar.DAY_OF_MONTH) -// -// val dpd = DatePickerDialog(this, { _, y, m, d -> -// product!!.dateOfExpiry = SimpleDateFormat("dd.MM.yyyy").parse("$d.${m+1}.$y")!!.time / 1000 -// update() -// }, year, month, day) -// -// dpd.show() -// } - amountTextEdit.addTextChangedListener { val text = amountTextEdit.text.toString() if (text == "") return@addTextChangedListener @@ -185,11 +157,6 @@ class AddProductActivity : AppCompatActivity() { shelfLifeTextEdit.visibility = View.VISIBLE } -// val dateOfProductionParsed = SimpleDateFormat("dd.MM.yyyy").format(Date(product!!.dateOfProduction * 1000)) -// findViewById(R.id.dateOfProductionTextView).text = "${getString(R.string.date_of_production)}: $dateOfProductionParsed" - -// val expiryDateParsed = SimpleDateFormat("dd.MM.yyyy").format(Date(product!!.dateOfExpiry * 1000)) -// expiryDateTextView.text = "${getString(R.string.expiry_date)}: $expiryDateParsed" val dateOfProduction = SimpleDateFormat("dd.MM.yyyy").format(product!!.dateOfProduction * 1000).split(".")