Created
May 11, 2020 17:04
-
-
Save rahulkhatri19/9b75313b1ff1ff455e47dbe5ff84ad6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected fun btnTicTac(view: View){ | |
val btnSelected = view as Button | |
var cellID= 0 | |
when(btnSelected.id){ | |
R.id.btnTicTac1 -> cellID=1 | |
R.id.btnTicTac2 -> cellID=2 | |
R.id.btnTicTac3 -> cellID=3 | |
R.id.btnTicTac4 -> cellID=4 | |
R.id.btnTicTac5 -> cellID=5 | |
R.id.btnTicTac6 -> cellID=6 | |
R.id.btnTicTac7 -> cellID=7 | |
R.id.btnTicTac8 -> cellID=8 | |
R.id.btnTicTac9 -> cellID=9 | |
} | |
Toast.makeText(this, "ID: "+cellID, Toast.LENGTH_SHORT).show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment