Chinaunix首页 | 论坛 | 博客
  • 博客访问: 518040
  • 博文数量: 107
  • 博客积分: 927
  • 博客等级: 大尉
  • 技术积分: 865
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-13 17:50
文章分类

全部博文(107)

文章存档

2014年(2)

2013年(13)

2012年(16)

2011年(76)

分类: Java

2012-01-13 17:03:36

print?
  1. diff --git a/AndroidManifest.xml b/AndroidManifest.xml  
  2. old mode 100644  
  3. new mode 100755  
  4. index 28c0e0d..019c969  
  5. --- a/AndroidManifest.xml  
  6. +++ b/AndroidManifest.xml  
  7. @@ -74,6 +74,7 @@  
  8.              android:clearTaskOnLaunch="true"  
  9.              android:stateNotNeeded="true"  
  10.              android:theme="@style/Theme"  
  11. +            android:configChanges="locale"  
  12.              android:windowSoftInputMode="stateUnspecified|adjustPan">  
  13.                
  14.                  "android.intent.action.MAIN" />  
  15. diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java  
  16. old mode 100644  
  17. new mode 100755  
  18. index e611303..f14d29f  
  19. --- a/src/com/android/launcher2/Launcher.java  
  20. +++ b/src/com/android/launcher2/Launcher.java  
  21. @@ -594,6 +594,15 @@ public final class Launcher extends Activity  
  22.      }  
  23.    
  24.      @Override  
  25. +    public void onConfigurationChanged(Configuration config) {  
  26. +        super.onConfigurationChanged(config);  
  27. +       checkForLocaleChange();  
  28. +       mModel.setAllAppsLoaded(false); // Set force load all apps list;  
  29. +       mModel.startLoader(thistrue); // Reload apps list  
  30. +   
  31. +    }  
  32. +  
  33. +    @Override  
  34.      protected void onPause() {  
  35.          super.onPause();  
  36.          mPaused = true;  
  37. diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java  
  38. old mode 100644  
  39. new mode 100755  
  40. index b819510..03a79dc  
  41. --- a/src/com/android/launcher2/LauncherModel.java  
  42. +++ b/src/com/android/launcher2/LauncherModel.java  
  43. @@ -95,6 +95,10 @@ public class LauncherModel extends BroadcastReceiver {  
  44.    
  45.      private Bitmap mDefaultIcon;  
  46.    
  47. +   public void setAllAppsLoaded(boolean load) {  
  48. +       mAllAppsLoaded = load;  
  49. +   }  
  50. +     
  51.      public interface Callbacks {  
  52.          public boolean setLoadOnResume();  
  53.          public int getCurrentWorkspaceScreen(); 
阅读(2204) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~