Alphabatize list of installed apps

后端 未结 1 881
遥遥无期
遥遥无期 2021-02-08 20:08

Hi I followed the below tutorial and successfully listed all of my installed apps in my application.

List all installed apps in style

However it does not list th

1条回答
  •  星月不相逢
    2021-02-08 20:35

    When you query Android to get the list of installed applications, you will get a List. Android supplies an ApplicationInfo.DisplayNameComparator for those:

    Collections.sort(apps, new ApplicationInfo.DisplayNameComparator(pm)); 
    

    (where pm is an instance of PackageManager).

    0 讨论(0)
提交回复
热议问题