我有两个问题:
- 我需要在 android 的微调器上查看马来语翻译
- 如何调用另一个程序;说谷歌环聊进入应用程序?
我已经得到了 values-ms 的翻译,我真的需要这个谢谢
我有两个问题:
我已经得到了 values-ms 的翻译,我真的需要这个谢谢
我找到了答案
String[] language= { "English", "Chinese (Simplified)", "Bahasa Malaysia"};
ArrayAdapter<String> adapter = new ArrayAdapter<String
(this,android.R.layout.simple_spinner_item,language);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
Configuration config = new Configuration();
Locale applang = new Locale ("ms");
switch (arg2){
case 0:
config.locale = Locale.ENGLISH;
break;
case 1:
config.locale = Locale.SIMPLIFIED_CHINESE;
break;
case 2:
config.locale = applang;
break;
default:
config.locale = Locale.ENGLISH;
break;
}
getResources().updateConfiguration(config, null);
}
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});