mcbotha / adw-launcher-android

Automatically exported from code.google.com/p/adw-launcher-android
0 stars 0 forks source link

application's label can't update after change language #304

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I found when change the language in phone's settings menu,open the all 
application,the application's label not follow
change the language

Original issue reported on code.google.com by newhope_...@sina.com on 27 Dec 2010 at 2:19

GoogleCodeExporter commented 9 years ago
It has not been fixed in v.1.3.6.

Original comment by hoyuf...@gmail.com on 28 Dec 2010 at 4:15

GoogleCodeExporter commented 9 years ago
你是中国人吗?给个QQ就Launcher交流下,我QQ83786963

Original comment by newhope_...@sina.com on 29 Dec 2010 at 2:04

GoogleCodeExporter commented 9 years ago
I fixed this bug as follow:change ApplicationsAdapter's add method to:
    @Override
    public void add(ApplicationInfo info) {
        //check allItems before added. It is a fix for all of the multi-icon issue, but will 
        //lose performance. Anyway, we do not expected to have many applications.
        synchronized (allItems) {
            /*if (!allItems.contains(info)) {
                changed = true;
                allItems.add(info);
                Collections.sort(allItems,new ApplicationInfoComparator());
            }*/
            int count=allItems.size();
            boolean found=false;
            for(int i=0;i<count;i++){
                ApplicationInfo athis=allItems.get(i);
                if(info.intent.getComponent()!=null){
                    if(athis.intent.getComponent().flattenToString().equals(
                            info.intent.getComponent().flattenToString())){
                        found=true;
                        if(!athis.title.equals(info.title)){
                            viewCache.remove(athis);
                            allItems.remove(i);
                            Collections.sort(allItems,new ApplicationInfoComparator());
                            updateDataSet();
                            found=false;
                        }
                        break;
                    }
                }
            }
            if(!found){
                allItems.add(info);
                Collections.sort(allItems,new ApplicationInfoComparator());
                updateDataSet();
            }
        } 
    }

Original comment by newhope_...@sina.com on 7 Jan 2011 at 8:42

GoogleCodeExporter commented 9 years ago
Did you try Restarting ADW from ADW Settings?

Original comment by klinster...@gmail.com on 30 Jan 2011 at 1:40

GoogleCodeExporter commented 9 years ago
restarting the ADWLauncher can solve this problem,but I think restarting the 
ADWLauncher isn't the best way to resolve this problem;

Original comment by newhope_...@sina.com on 30 Jan 2011 at 2:40

GoogleCodeExporter commented 9 years ago
I fixed this bug on other way:add a method in ApplicationsAdapter 
public void flush(){
  sychronized(viewCache){
      viewCache.clear();
      allItem.clear();
}

and at the launcher's onDestory call this method

Original comment by Hyjf...@gmail.com on 16 Sep 2011 at 7:41