I'm passing an url as string from Fragment to Activity. But I'm getting an error of could resolve getArguments()
and it is highlighted in red color
Inside Fragment
Intent i = new Intent(getActivity(), web.class);
Bundle args1 = new Bundle();
args1.putString("url1", "file:///android_asset/em/japan.html");
startActivity(i);
((Activity) getActivity()).overridePendingTransition(0,0);
and inside activity where I want to receive string, I've used
String url1 = getArguments().getString("url1");`
But getArguments()
is highlighted in red color.
Thanks in advance.