My app downloading a Events from sqldatabase and add it to ArrayList<>. It do aduplicate so I wrote:
public static ArrayList<Events> list = new ArrayList<Events>();
  static void addevhlp(Events e){
        if (list.contains(e)){
         Log.d("","it cointains")
        }
        else {
            list.add(e);
        }
    }
But it never say me the list cointans element. What I'm doing wrong?
 
     
     
     
     
     
    