title: Pass Data from Activity to Fragment in Viewpager Tablayout
body: <p>I used below code to passing data from Activity to Fragment.</p>
  
  <p><strong>Fragment Code</strong></p>
  
  <pre><code>public class StoryDetailFragmentInfo extends Fragment {
  View view;
  TextView txtDescrible;
  
  final static String getData = "abc";
  
  public static StoryDetailFragmentInfo newInstance(String paramater){
      Bundle bundle = new Bundle();
      bundle.putString(getData,"Message");
      StoryDetailFragmentInfo fragmentInfo = new StoryDetailFragmentInfo();
      fragmentInfo.setArguments(bundle);
      return fragmentInfo;
  }
  
  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      if(getArguments()!=null){
          String test = getArguments().getString(getData);
      }
  
  
  
  }
  
  @Nullable
  @Override
  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  
      view = inflater.inflate(R.layout.story_detail_fragment_info_layout, container, false);
  
       txtDescrible = view.findViewById(R.id.txt_describleDetail);
  
      return view;
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>MainActivity Code</strong></p>
  
  <pre><code>   @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.story_detail_layout);
      addControls();
      loadData();
      intentData();
      fillDataToView();
  }
  
  private void intentData() {
      StoryDetailFragmentInfo.newInstance("Hello babe");
  
  }
  </code></pre>
  
  <p>Problem is <code>getArgument()</code> in my fragment is <code>null</code> and i can't get data What should i do?<br>
  Can you help me explain it? Thanks for reading.</p>