Zha*_*bul 2 java android utf-8 android-studio
我正在开发俄语版的Android应用程序.
这是我的AlertMessage班级,只有一个方法和一个俄语单词:
public class AlertMessage {
public static boolean isYes (Context context, String header, String message){
final boolean[] isYes = {false};
new AlertDialog.Builder(context)
.setTitle(header)
.setMessage(message)
.setNegativeButton(android.R.string.no, null)
.setPositiveButton("??",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
isYes[0] = true;
}
}).create().show();
return isYes[0];
}
}
Run Code Online (Sandbox Code Playgroud)
我把它叫做MainActivity:
@Override
public void onBackPressed(){
if(AlertMessage.isYes(this,"?????","?? ???????, ??? ?????? ????? ?? ?????????"))
{
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_HOME);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
App.super.onBackPressed();
Log.i("App", "Exit");
finish();
}
}
Run Code Online (Sandbox Code Playgroud)
一切都很好,除了AlertMessage课堂上的一个俄语单词.这是不可读的.我该如何解决?
| 归档时间: |
|
| 查看次数: |
2596 次 |
| 最近记录: |