elow is the snippet of the code for onclick actions that must take place but apparently, it isn’t working!
#fun buClick(view:View)#
{
val buSel=view as Button
var buVal:String=etShow.text.toString()
when(buSel.id)
{
button2.id->
{
buVal+="-"+buVal
}
button5.id->
{
buVal+="7"
}
button6.id->
{
buVal+="8"
}
button7.id->
{
buVal+="9"
}
button9.id->
{
buVal+="4"
}
button10.id->
{
buVal+="5"
}
button11.id->
{
buVal+="6"
}
button13.id->
{
buVal+="1"
}
button14.id->
{
buVal+="2"
}
button15.id->
{
buVal+="3"
}
button17.id->
{
buVal+="0"
}
button18.id->
{
buVal+="."
}
}
#etShow.setText(buVal)#
}