The idea is i have a listview where each item is a product, when I click in the item, I need to go to another Fragment from the click which is inside the adapter of the list
What I did to resolve this is:
Intent i = new Intent(v.getContext(), MainActivity.class); i.putExtra("fragment_value", "2"); v.getContext().startActivity(i);
In main class I get the parameter as value and with a switch I set fragment in main which I am interested.