title: setSupportActionBar on fragment class Android
body: <p>I want to add a toolbar for my class which handles the communication between the fragments.  </p>
  
  <pre><code>public class FragmentClass extends Activity implements Communicator{
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      setContentView(R.layout.content2);
      Toolbar toolbar = (Toolbar) findViewById(R.id.playerToolbar);
      setSupportActionBar(toolbar);
  
      super.onCreate(savedInstanceState);
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ylbpn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ylbpn.png" alt="enter image description here"></a></p>
  
  <p>As ypu can see Im getting error on setSupportActionbar, when i hover over it I get <code>"cannot resolve method 'setSupportActionbar(android.support.v7.widget.Toolbar)'"</code></p>