app/src/main/java/fi/finwe/orion360/sdk/pro/examples/MainMenu.java
private HashMap<String, List<ActivityData>> createActivityGroups(List<ActivityData> data) {
		HashMap<String, List<ActivityData>> grouped = new HashMap<>();

		for (ActivityData activityData : data) {
            String fullName = activityData.get(KEY_ACTIVITY_FULL_NAME);
			String groupName = fullName.substring(
                    (fullName.substring(0, fullName.lastIndexOf('.'))).lastIndexOf('.') + 1,
                    fullName.lastIndexOf('.'));
            String GroupName = groupName.substring(0, 1).toUpperCase() + groupName.substring(1);
            if (grouped.containsKey(GroupName)) {
                List<ActivityData> oldGroup = grouped.get(GroupName);
                oldGroup.add(activityData);
            } else {
                List<ActivityData> newGroup = new ArrayList<>();
                newGroup.add(activityData);
                grouped.put(GroupName, newGroup);
            }
		}

		return grouped;
	}
/**
	 * Group activity data structures by their last package names.
	 *
	 * @param data The key-value data structure of each activity to be grouped.
	 * @return A map containing grouped activity data structures.
     */
Group activity data structures by their last package names.
@param data The key-value data structure of each activity to be grouped.
@return A map containing grouped activity data structures.
Group activity data structures by their last package names . @param data The key - value data structure of each activity to be grouped . @return A map containing grouped activity data structures .
private HashMap<String, List<ActivityData>> createActivityGroups(List<ActivityData> data) {
		HashMap<String, List<ActivityData>> grouped = new HashMap<>();
		for (ActivityData activityData : data) {
            String fullName = activityData.get(KEY_ACTIVITY_FULL_NAME);
			String groupName = fullName.substring(
                    (fullName.substring(0, fullName.lastIndexOf('.'))).lastIndexOf('.') + 1,
                    fullName.lastIndexOf('.'));
            String GroupName = groupName.substring(0, 1).toUpperCase() + groupName.substring(1);
            if (grouped.containsKey(GroupName)) {
                List<ActivityData> oldGroup = grouped.get(GroupName);
                oldGroup.add(activityData);
            } else {
                List<ActivityData> newGroup = new ArrayList<>();
                newGroup.add(activityData);
                grouped.put(GroupName, newGroup);
            }
		}
		return grouped;
	}
private HashMap < String , List < ActivityData > > createActivityGroups ( List < ActivityData > data ) { HashMap < String , List < ActivityData > > grouped = new HashMap < > ( ) ; for ( ActivityData activityData : data ) { String fullName = activityData . get ( KEY_ACTIVITY_FULL_NAME ) ; String groupName = fullName . substring ( ( fullName . substring ( 0 , fullName . lastIndexOf ( '.' ) ) ) . lastIndexOf ( '.' ) + 1 , fullName . lastIndexOf ( '.' ) ) ; String GroupName = groupName . substring ( 0 , 1 ) . toUpperCase ( ) + groupName . substring ( 1 ) ; if ( grouped . containsKey ( GroupName ) ) { List < ActivityData > oldGroup = grouped . get ( GroupName ) ; oldGroup . add ( activityData ) ; } else { List < ActivityData > newGroup = new ArrayList < > ( ) ; newGroup . add ( activityData ) ; grouped . put ( GroupName , newGroup ) ; } } return grouped ; }
Group activity data structures by their last package names.
Group activity data structures by their last package names .