I have this in my OnItemClick method.
final String[] links = getResources().getStringArray(R.array.pokemon_stats);
String content = links[position];
Intent showContent = new Intent(getApplicationContext(),
PokedexViewActivity.class);
showContent.setData(content);
startActivity(showContent);
It doesn’t like that I have .setData(content). I believe setData is for URI’s. What do I do for a string array? This is the exact error when I hover. The method setData(Uri) in the type Intent is not applicable for the arguments (String)
I switched it to this and I can’t get the pokemon stats:
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
final String[] links = getResources().getStringArray(R.array.pokemon_stats);
String content = links[position];
Intent showContent = new Intent(getApplicationContext(),
PokedexViewActivity.class);
Bundle extras = getIntent().getExtras();
String pokeStats = extras.getString("MarcsString");
showContent.putExtra(pokeStats, content);
startActivity(showContent);
Use
showContent.putExtra("key", value);