I know that this question was already asked but I get an error when I do this:
Intent toNextPage = new Intent(this, After_report_page.class);
startActivity(toNextPage);
How can I fix this (I want that on button click that xml layout switches)?
Thank you,
Boaz
use Activity Context to start next Activity instead of View as:
or you can use
view.getContext()to get context from starting new Activity as: