i create new activity as favorite page and put in many textview and set visibility all of them =gone now i recive int variable from another activity with sharedprefrence() i get the value butt i dont know how to visible textview one by one i use if/switch to check value but only one textview at same time be visible how can i keep one visibility and show other textview?
here my cod
SharedPreferences pref = getApplicationContext().getSharedPreferences("MyPref", MODE_PRIVATE);
int score = pref.getInt("score", 0);
if (score==100) {v1();}
else if (score==101) {v2();}
else if (score==102) {v3();}
else if (score==103) {v4();}
else if (score==104) {v5();}
else if (score==105) {v6();}
else if (score==106) {v7();}
public void v1(){
tv_fav7.setVisibility(View.VISIBLE);
tv_fav7.setText("777");
}
public void v2(){
tv_fav6.setVisibility(View.VISIBLE);
tv_fav6.setText("666");
}
public void v3(){
tv_fav5.setVisibility(View.VISIBLE);
tv_fav5.setText("555");
}
public void v4(){
tv_fav4.setVisibility(View.VISIBLE);
tv_fav4.setText("444");
}
public void v5(){
tv_fav3.setVisibility(View.VISIBLE);
tv_fav3.setText("333");
}
public void v6(){
tv_fav2.setVisibility(View.VISIBLE);
tv_fav2.setText("222");
}
public void v7(){
tv_fav1.setVisibility(View.VISIBLE);
tv_fav1.setText("111");
}