Android Animation - Button stays clickable

前端 未结 2 2024
暖寄归人
暖寄归人 2020-12-12 00:52

I am making a game in which I have 5 buttons, looking like clouds, falling from the \"sky\". That means that when my activity starts, \'clouds\' cannot be seen,

2条回答
  •  情话喂你
    2020-12-12 01:48

    You can change the buttons to imageViews and then do

     imageView.setOnClickListener(myListener)
    

    then set myListener to do whatever you previously wanted to happen on the buttons onClick. Your activity will have to implement OnClickListener

    Added bonus: you can make the images look like clouds :)

提交回复
热议问题