String Sex= new String();
if(ManCheck == true)
{
Sex = "Your gender : " + getResources().getString(R.string.man);
}
else if(WomanCheck == true)
{
Sex = "Your gender : " + getResources().getString(R.string.woman);
}
MainText.setText(Sex);
이렇게 하려고 했더니 오류가 나더라구요...
final String Sex=new String();
으로 변수를 선언하면 setText가 되긴하는데
아래 if문이 소용없어지자나요..ㅠ
어떻게 방법이 없나요?
String Sex= new String();
if(ManCheck == true)
{
Sex = "Your gender : " + getResources().getString(R.string.man);
}
else if(WomanCheck == true)
{
Sex = "Your gender : " + getResources().getString(R.string.woman);
}
final String gender = Sex;
MainText.setText(Gender);
이렇게 하면 되긴하네요;;; 근데 변수의 오남용이 아닐런지 ㅠㅠ




String Sex=""; 이렇게 해보세요.