app/src/main/java/com/majway/mlh/rugrat/ChildListAdapter.java
/*Checks whether a particular child exists in MothersSharedPreferences*/
Checks whether a particular child exists in MothersSharedPreferences
Checks whether a particular child exists in MothersSharedPreferences
public boolean checkFavoriteItem(Child checkChild) {
        boolean check = false;
        List<Child> favorites = sharedPreference.getChildren(context);
        if (favorites != null) {
            for (Child child : favorites) {
                if (child.equals(checkChild)) {
                    check = true;
                    break;
                }
            }
        }
        return check;
    }
public boolean checkFavoriteItem ( Child checkChild ) { boolean check = false ; List < Child > favorites = sharedPreference . getChildren ( context ) ; if ( favorites != null ) { for ( Child child : favorites ) { if ( child . equals ( checkChild ) ) { check = true ; break ; } } } return check ; }
Checks whether a particular child exists in MothersSharedPreferences
Checks whether a particular child exists in MothersSharedPreferences