B
B
BitNeBolt2020-03-09 18:48:20
Android
BitNeBolt, 2020-03-09 18:48:20

Why doesn't the activity switch when the button from the fragment is pressed?

I want to open a new activity by pressing a button in the fragment. I do it like this:

Intent intent = new Intent(getActivity(), BikeChoiseActivity.class);
//getActivity().startActivity(intent);
//getActivity().finish();


But at the moment startActivity() the program crashes. How to fix it and better to do in similar situations?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick, 2020-03-09
@BitNeBolt

Is BikeChoiseActivity in the manifest?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question