i am developing one walkie talkie app in that i am using walkie talkie image button. when i click on that image it should show the different image and when realise that button it should show the previous image . bellow code walk1 first image and walk2 is second image which should see when image button is clicked
,,,
walk1=findViewById(R.id.walky)
walk2=findViewById(R.id.walky1)
walk1?.setOnLongClickListener {
walk2?.visibility=View.VISIBLE
true // Don't consume event, if return false. Consume event if true.
}
walk2?.setOnClickListener {
walk2?.visibility=View.GONE
}
,,, in this code its showing second image but when i realised button its not showing first image when i click again that time its showing