I am using fragmentActivity, and it already extends OnMapReadyCallback, and cannot extend activity or appcompat.
THis gives me error on setSupportActionBar.
Java :
public class MapsActivity extends FragmentActivity implements
OnMapReadyCallback
toolbar = (Toolbar) findViewById(R.id.app_bar);
setSupportActionBar(toolbar);
This is the error that comes up - Error:(80, 9) error: cannot find symbol method setSupportActionBar(Toolbar)
Activity Layout:
<include
android:id="@+id/app_bar"
layout="@layout/app_bar"/>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
xmlns:tools="http://schemas.android.com/tools"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.pos.gisapp.MapsActivity" />
And the actual app_bar.xml :
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:elevation="4dp">
</android.support.v7.widget.Toolbar>