나는이 방법은 이미지 리소스를 설정하기위한 올바른 보이나요 .... 드로어 블의 배열에서 프로그래밍 방식으로 이미지 뷰의 이미지를 설정하지만, NullPointerException가 점점 계속 노력하고 있어요 ..설정 이미지 뷰 그리기 programmically
//get a random drawable
int[] imageSelection= {R.drawable.buddycheck, R.drawable.logdive3, R.drawable.sea, R.drawable.weather, R.drawable.logo1};
Random whichImage = new Random();
int theImage = whichImage.nextInt(imageSelection.length);
displayImage.setBackgroundResource(theImage);
displayImage를 어디에서 어떻게 초기화합니까? – BrainCrash