title: Passing data by using bundle between tablayout
body: <p>I am using Bundle to passing data from my First <code>TabFragment</code> but it prompts out with the <code>NullPointerException</code>. Error is occur when <code>getArguments()</code> in <code>list_fragments2</code> in second tab</p>
  
  <p><strong>MainActivity Fragment</strong></p>
  
  <pre><code>list_fragment2 fragment = new list_fragment2();
  Bundle b = new Bundle();
  b.putString("test","text");
  fragment.setArguments(b);
  Toast.makeText(this, "" + b, Toast.LENGTH_SHORT).show();
  </code></pre>
  
  <p><strong>SecondActivity Fragment</strong></p>
  
  <pre><code> public class list_fragment2 extends Fragment {
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
          View h = inflater.inflate(R.layout.tab2, container, false);
          TextView textView = (TextView) h.findViewById(R.id.textView);
  
          Bundle bundle=getArguments();
  
          //your string
          if(bundle != null) {
              String test = bundle.getString("test");
              textView.setText(test);
          }
              return h;
  
      }
  }
  </code></pre>