title: Button on a fragment won't link to another activity, no matter what I try
body: <p>I've created my own java class fragments for a tabbed activity and everything was going well until I had to link some image buttons to other activities.</p>
  
  <p>For reasons I do no understand, the code I learned to use to make buttons on other activities won't work on my fragment pages.</p>
  
  <p>I've figured out how to use findViewbyId on a fragment using getView... but it still wont let me link my image button to another activity.</p>
  
  <pre><code>package com.example.reachv2.ui.main;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageButton;
  import androidx.annotation.NonNull;
  import androidx.annotation.Nullable;
  import androidx.fragment.app.Fragment;
  import com.example.reachv2.HelpLine;
  import com.example.reachv2.R;
  
  public class Frag2 extends Fragment {
      private ImageButton button;
  
      @Nullable
      @Override
      public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
          return inflater.inflate(R.layout.frag2_layout, container, false);
          button = (ImageButton) getView().findViewById(R.id.imageButton2);
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  openHelpLine();
              }
          });
          }
  
      public void openHelpLine() {
          Intent intent = new Intent(Frag2.this,HelpLine.class);
          startActivity(intent);
      }
  }
  </code></pre>
  
  <blockquote>
    <p>error: no suitable constructor found for
    Intent(Frag2,Class)
        constructor Intent.Intent(String,Uri) is not applicable
        (argument mismatch; Frag2 cannot be converted to String)
        constructor Intent.Intent(Context,Class) is not applicable
        (argument mismatch; Frag2 cannot be converted to Context)</p>
  </blockquote>