Tuesday, 3 February 2015

this is very good site [on hold]



i am too confused about my last code in app. please give me some suggestions that how can i resolve this issue. when user click on hint button 1 hint is generated but when user again click on hint button 2 hints are show at same time please help meto solve this


my code is:



@Override
public void onClick(View arg0) {

if(hint==0){

t6=(TextView)findViewById(R.id.textView6);
for(int i=0;i<=1;i++) {

Random random = new Random();
int rndIndex = random.nextInt(img.length);
img[rndIndex].setVisibility(View.DRAWING_CACHE_QUALITY_HIGH);
}

}
else {

hint -=1;
String str= Integer.toString(hint);
t6.setText(str);


if(hint==2){

for(int i=0;i<=1;i++) {

Random random = new Random();
int rndIndex = random.nextInt(img.length);
img[rndIndex].setVisibility(View.DRAWING_CACHE_QUALITY_HIGH);
}}

else if (hint==1){

for(int i=0;i<=1;i++) {

Random random = new Random();
int rndIndex = random.nextInt(img.length);
img[rndIndex].setVisibility(View.FOCUS_FORWARD);
}
}

else if(hint==0){
t4.setOnClickListener(null);
}

}
}
});

No comments:

Post a Comment