첫번째 방법 about_text.setText (Strings.ABOUT);
TextView contactus_text = (TextView) findViewById(R.id.tv_contactus);
contactus_text.setText(Strings.CONTACT_US);
AlertDialog.Builder alertDialog = new AlertDialog.Builder (Language.this);
alertDialog.setTitle("Alert");
alertDialog.setMessage("Language changed successfully");
alertDialog.setCancelable(false);
alertDialog.setPositiveButton("Continue",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(Language.this,MenuScreen.class); startActivity(intent);
finish();
}
});
alertDialog.show();
두번째 방식 : POSTDELAYED 방법을 사용
텍스트 뷰의 terms_text = (텍스트 뷰) findViewById를 (R.id.tv_terms); terms_text.setText (Strings.TERMS);
TextView about_text = (TextView) findViewById (R.id.tv_aboutus); about_text.setText (Strings.ABOUT);
TextView contactus_text = (TextView) findViewById(R.id.tv_contactus);
contactus_text.setText(Strings.CONTACT_US);
new Handler().postDelayed(new Runnable(){
public void run(){
Intent intent = new Intent(Language.this,MenuScreen.class);
startActivity(intent);
}
},100);
간단한 startActivity() 및 finsih() 코드를 제거하면 값이 변경되는지 여부를 알 수 있습니다. –
이 텍스트를 설정 한 활동을 마치고 있습니다. – jvrodrigues
실제 문제는 다음과 같습니다. 처음 시간은 값이 반영되지 않고 두 번째 시간부터 적용됩니다. 즉, 다른 화면으로 이동하여 다시 수정 된 화면으로 이동하는 경우입니다. .. 이번에는 내용이 수정되고 있습니다. –