The error message during compilation and the message of stack trace during an exception occuring during the life span of an application provides enough clue of the issue.
In your case it clearly says "Non Static method deleteCard(int)
cannot be referenced from a static context". Here you are correct that deleteCard is non static and same is evident from the first part of the message : "Non static method deleteCard(int)
.. " , but you have missed the second part of the message which tells about the issue i.e. "...can not be referenced from a static context".
You should in such situation see as how you are referencing the field or method. You are using a classname to invoke the method. It is a static context.
All the member instance fields and methods needs an instance of their class and then only using the reference to that object you can access them. Non static member fields and methods belong to an object. You access non static fields of an object and invoke non static methods on an object and for doing so you need a reference of the corresponding class.
You need an object of the class CardAdapter
to invoke any instance member method as the method is non static.