I'm trying to do
Database db = new Database(this.getApplicationContext());
Where Database is a class I have with all the Database-related methods and what I'm calling to populate an ExpandableList. However, I'm getting error in this , the error is " Cannot referenced from a static context
".
How can I get the context so I do not get this error?
public class ExpandableList {
public static HashMap<String, List<String>> getData() {
HashMap<String, List<String>> expandableListDetail = new HashMap<String, List<String>>();
List<String> exemplos = new ArrayList<String>();
Database db = new Database(this.getApplicationContext());
(...)