1

我有两个问题:

  1. 我需要在 android 的微调器上查看马来语翻译
  2. 如何调用另一个程序;说谷歌环聊进入应用程序?

我已经得到了 values-ms 的翻译,我真的需要这个谢谢

4

1 回答 1

2

我找到了答案

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      
        }
    });
于 2014-02-06T03:54:19.853 回答