get intent not working in fragment
// add the getActivity() before getIntent and it should work perfectly
// inside your fragment
Bundle bundle = getActivity().getIntent().getExtras();
get intent not working in fragment
// add the getActivity() before getIntent and it should work perfectly
// inside your fragment
Bundle bundle = getActivity().getIntent().getExtras();
intent in fragment android
Button button = (Button) rootView.findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getActivity(), AnotherActivity.class);
startActivity(intent);
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us