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

后端 未结 5 1965
無奈伤痛
無奈伤痛 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:44

    I slightly changed an accepted answer (it also works) to avoid handlers.

    @Override
    public void onAnimationEnd(Animation animation) {
        imageView.post(new Runnable() {
            @Override
            public void run() {
                layout.removeView(imageView);
            }
        });
    }
    

提交回复
热议问题