Reformat Code
This commit is contained in:
@@ -249,7 +249,12 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
if (inputTeamA.text.isNotEmpty() && inputTeamB.text.isNotEmpty()) {
|
||||
|
||||
history.logRound(Round(inputTeamA.text.toString().toInt(), inputTeamB.text.toString().toInt()))
|
||||
history.logRound(
|
||||
Round(
|
||||
inputTeamA.text.toString().toInt(),
|
||||
inputTeamB.text.toString().toInt()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
updateView()
|
||||
@@ -283,7 +288,19 @@ class MainActivity : AppCompatActivity() {
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.action_clear -> {
|
||||
val builder = AlertDialog.Builder(this)
|
||||
builder.setMessage(getString(R.string.confirmClear))
|
||||
.setTitle(R.string.clear)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.yes)) { dialog, id ->
|
||||
dialog.dismiss()
|
||||
clearAll()
|
||||
}
|
||||
.setNegativeButton(getString(R.string.no)) { dialog, id ->
|
||||
dialog.cancel()
|
||||
}
|
||||
|
||||
builder.create().show()
|
||||
true
|
||||
}
|
||||
R.id.action_undo -> {
|
||||
@@ -343,8 +360,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
inputTeamA.text.append(toAppend)
|
||||
}else if(inputTeamB.isFocused)
|
||||
{
|
||||
} else if (inputTeamB.isFocused) {
|
||||
if (invertB) {
|
||||
invertB = false
|
||||
inputTeamB.text.append('-')
|
||||
|
||||
Reference in New Issue
Block a user