class picture {
ArrayList<Integer> arrayItem;
Integer D_Picture1[] = { R.drawable.a_1 };
Integer D_Picture2[] = { R.drawable.b_1, R.drawable.b_2,R.drawable.b_3, R.drawable.b_4, R.drawable.b_4 };
Integer D_Picture3[] = { R.drawable.c_1};
Integer D_Picture4[] = { R.drawable.d_1};
public picture (){
arrayItem = new ArrayList<Integer>();
}
}
이렇게 해서 arrayitem 에다가 위에 배열로 저장된 그림 값들을 다 차곡차곡 저장시키고 싶은데요 ㅠ
제가하려는게 ArrayList에 저 배열들을 다 저장시킨뒤에
그리드뷰에서 이벤트를줬을때 각각에 해당하는 배열값을 불러와 그 배열에 저장된
그림들 을 보여주고싶어서 인데,,,,
단순하게
arrayItem.add(D_Picture1);
arrayItem.add(D_Picture2);
arrayItem.add(D_Picture3);
arrayItem.add(D_Picture4);
입력하고 저장되면 좋은데 아마 배열의 길이가 각각 다달라서 빨간줄이 add부분에 빨간줄이 뜨더군요 ㅠㅠ
그렇다고 for(int i=0; i<D_Picture1.length; i++){ 해서
arrayItem.add(D_Picture1[i]); } 이렇게 줘버리면 D_Picture1의 경운 상관없지만 D_Picture2의 경우엔
ArrayList에 4개의 스택이 쌓이는 형태로 저장될텐데...
그것도 문제고,,,, 각각 0번지 스택에는 D_Picture1 / 1번지에는 D_Picture2가
차곡차곡 배열값을 저장시키고 싶습니다
어떻게해야될지 모르겠네요 도와주세요!