安卓设置里面语言修改为自己想要的个数

+++ b/android/frameworks/base/core/java/com/android/internal/app/LocalePicker.java
@@ -95,19 +95,22 @@ public class LocalePicker extends ListFragment {
     public static List<LocaleInfo> getAllAssetLocales(Context context, boolean isInDeveloperMode) {
         final Resources resources = context.getResources();
 
-        final String[] locales = Resources.getSystem().getAssets().getLocales();
-        List<String> localeList = new ArrayList<String>(locales.length);
+        //final String[] locales = Resources.getSystem().getAssets().getLocales();
+               //final String[] locales = {"ar-XB","zh-CN","zh-TW","de-DE","en-US","es-US","fr-FR","ja-JP","ko-KR","it-IT","pt-PT","ru-RU","th-TH","tr-TR"};
+               //final String[] locales = {"zh-CN","zh-TW","en-US","de-DE","es-US","fr-FR","ja-JP","ko-KR","it-IT","pt-PT","ru-RU","th-TH","tr-TR","he","cs-CZ","ar-SA
+               final String[] locales = {"zh-CN","zh-TW","en-US","de-DE","es-US","fr-FR","ja-JP","ko-KR","it-IT","pt-PT","ru-RU","th-TH","tr-TR","he","cs-CZ","ar-SA"}
+               List<String> localeList = new ArrayList<String>(locales.length);
         Collections.addAll(localeList, locales);
 
         // Don't show the pseudolocales unless we're in developer mode. http://b/17190407.
-        if (!isInDeveloperMode) {
+        /*if (!isInDeveloperMode) {
             localeList.remove("ar-XB");
             localeList.remove("en-XA");
         }
 
         //ActionsCode(phchen, BUGFIX: BUG00233584 ), 
         localeList.remove("si_LK");
-        localeList.remove("si-LK");
+        localeList.remove("si-LK");*/
 
         Collections.sort(localeList);
         final String[] specialLocaleCodes = resources.getStringArray(R.array.special_locale_codes);

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值