Sorting the List of Hybrid Apps

By default, Hybrid Apps are sorted alphabetically, ignoring case. The customization tag associated with sorting the list of Hybrid Apps is BLACKBERRY_CUSTOMIZATION_POINT_HYBRIDAPPSORT.

  1. Open the CustomizationHelper.java file for editing.
  2. Search for the method named getHybridAppComparator() and modify the code to suit your sorting requirements.
    This example shows the Hybrid App being sorted by display name in reverse alphabetical order:
    public Comparator getHybridAppComparator() {
    return new Comparator() {
    public int compare(Object oApp1, Object oApp2) {
    String sDisplayName1 = ((HybridApp) oApp1).getDisplayName()
    .toLowerCase();
    String sDisplayName2 = ((HybridApp) oApp2).getDisplayName()
    .toLowerCase();
    return (-1)*sDisplayName1.compareTo(sDisplayName2);
    }
    };
    }
  3. Save the file.
  4. Rebuild the project.