private void initTechnicalTxt() {
byte testOne = 1;
byte testTwo = 2;
boolean siFirstRequest = MMKV.defaultMMKV().getBoolean(ISFIRSTTEGTENCHTXT, true);
RequestHelper.setRemindRead(testOne, testTwo, new ResultCallBack<Void, Void, Void>() {
@Override
public void onSuccess(Void unused, Void unused2, Void unused3) {
String systemLanguage = getSystemLanguage();
switch (systemLanguage){
case "zh":
MMKV.defaultMMKV().putString(LASTTEGTENCHTXT, "");
String strTxt = getString(R.string.about_techcitxt, "");
technicalTextView.setText(strTxt);
setTextLength(technicalTextView);
break;
case "ms":
MMKV.defaultMMKV().putString(LASTTEGTENCHTXT, "");
String maTxt = getString(R.string.about_techcitxt, "");
technicalTextView.setText(maTxt);
setTextLength(technicalTextView);
break;
case "ar":
MMKV.defaultMMKV().putString(LASTTEGTENCHTXT, "");
String arTxt = getString(R.string.about_techcitxt, "");
technicalTextView.setText(arTxt);
setTextLength(technicalTextView);
break;
case "en":
MMKV.defaultMMKV().putString(LASTTEGTENCHTXT, "");
String enTxt = getString(R.string.about_techcitxt, "");
technicalTextView.setText(enTxt);
setTextLength(technicalTextView);
break;
default:
break;
}
}
@Override
public void onError(int code, String message) {
if (siFirstRequest) {
String strTxt = getString(R.string.about_techcitxt, TAGTENCH);
technicalTextView.setText(strTxt);
MMKV.defaultMMKV().putBoolean(ISFIRSTTEGTENCHTXT, false);
setTextLength(technicalTextView);
} else {
String lastTechnicalTxtSp = MMKV.defaultMMKV().getString(LASTTEGTENCHTXT, "");
String strTxt = getString(R.string.about_techcitxt, lastTechnicalTxtSp);
technicalTextView.setText(strTxt);
setTextLength(technicalTextView);
}
//
}
});
}
网友评论