Trying to pass URL from EditText to Fragment

view full story

http://stackoverflow.com – I am trying to pass a String value "url" to a fragment to display it in a web view. I keep getting the following error: java.lang.NullPointerException This is my code: protected void goToTab1View() { if(mTabState != TAB1_STATE){ mTabState = TAB1_STATE; Toast.makeText(getActivity(), "goToTabView1: " + url, Toast.LENGTH_SHORT).show(); FragmentManager fm = getFragmentManager(); if(fm!= null){ //Perform fragment transaction FragmentTransaction ft = fm.beginTransaction(); FragTab1 f = new FragTab1(); f.setString( (HowTos)