I have searched the internet high and low for the answer to this error:
Non-static method 'getStringExtra(java.lang.String)' cannot be referenced from a static context
I have not found anything so I have come here. Here is the code I use for adding the info as extras:
Intent OpenList = new Intent(this, ListRandom.class);
OpenList.putExtra("ListItem1",List.get(1));
OpenList.putExtra("ListItem2", List.get(2));
OpenList.putExtra("ListItem3", List.get(3));
OpenList.putExtra("ListItem4",List.get(4));
OpenList.putExtra("ListItem5", List.get(5));
And here is getting the Extras, where I get the error:
Intent OpenList = getIntent();
ListItem1 = Intent.getStringExtra("ListItem1");
ListItem2 = Intent.getStringExtra("ListItem2");
ListItem3 = Intent.getStringExtra("ListItem3");
ListItem4 = Intent.getStringExtra("ListItem4");
ListItem5 = Intent.getStringExtra("ListItem5");
Any help would be appreciated as I am growing as a programmer!