안드로이드 개발 질문/답변
(글 수 45,052)
if (copy.size() == 0) {
btntrue = (int)((Math.random() * 10));
T_Quiz_E.setText(Word_E_moon.get(btntrue));
copy.add(btntrue);
}else{
btntrue = (int)((Math.random() * 10));
Boolean ff = false;
for (int i = 0; i < copy.size(); i++) {
if (btntrue != copy.get(i)) {
ff = true;
}
}
if (ff) {
T_Quiz_E.setText(Word_E_moon.get(btntrue));
copy.add(btntrue);
}else{
start();
}
}
일단 디비에서 랜덤으로 불러오기를 한 소스 입니다.
난수를 발생 시켜 불러오는 건데요
이렇게 불러 올때 문제가 하나 생기더라구요
바로 중복도 되서 불러오더라구요
어떻게 하면 중복안되게 불러올수 있을까요?