title: fragment does not go to activity [Android]
body: <p>It's been less than a week since I learned Android. trying to create a project, but there are some things that don't work.</p>
  <p><strong>Problem</strong>: Does not move from fragment to activity</p>
  <p><strong>Tried</strong>: Browse the document on Google. and I used @Override for <code>onclickListener</code> in <code>HomeFragment.java</code> A red line popped up and woke up remove, but still don't know what the error is.</p>
  <p><strong>HomeFragment.java</strong></p>
  <pre><code>public class HomeFragment extends Fragment {
  
      private HomeViewModel homeViewModel;
      private Button btn_today;
  
      public View onCreateView(@NonNull LayoutInflater inflater,
                               ViewGroup container, Bundle savedInstanceState) {
          homeViewModel = new ViewModelProvider(this).get(HomeViewModel.class);
          View root = inflater.inflate(R.layout.fragment_home, container, false);
  
          ViewGroup root_view = (ViewGroup)inflater.inflate(R.layout.fragment_home, container, false);
  
          Button btn_today = (Button)root_view.findViewById(R.id.btn_today);
  
          btn_today.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View view) {
              Intent intent = new Intent(getActivity(), HomeActivity.class);
              startActivity(intent);
              }
          });
  
          return root;
      }
  
  
  }
  </code></pre>
  <p>used the <strong>Navigation Drawer Activity</strong> when I first <strong>created the project</strong>.</p>
  <p>what <code>I want to do is click on the button btn_today to go to the activity page (in xml file)</code></p>
  <p>I'm a beginner or I don't know what the problem is. appreciate any help
  doing it all day, but I'm not sure.</p>