NullPointerException that doesn't point to any line in my code

后端 未结 5 1966
無奈伤痛
無奈伤痛 2020-12-04 19:22

I am working on a game where the player can drag and drop things around the screen. I\'ve got a private method which allows me to simulate a drag/drop event for any of the i

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 19:41

    Can you try this, to ensure that simulateMovingImg is present

        if (myLayout.indexOfChild() >= 0)
        {
            myLayout.removeView(simulateMovingImg);
        }
    

提交回复
热议问题