I am having problems when using the library getbase.floatingactionbutton found here.
I am receiving the error:
The following classes could not be instantiated:
- com.getbase.floatingactionbutton.FloatingActionMenu
- com.getbase.floatingactionbutton.FloatingActionButton
I have put
dependencies {
compile 'com.getbase:floatingactionbutton:1.10.1'
}
into my app level build.gradle and have even taken the xml code for the fab straight from the sample app on github so what am I doing wrong? I'm at an end with this and I just can't figure it out!
xml:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapsActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- other content in the activity -->
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment" />
</LinearLayout>
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- floating action menu with buttons -->
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/right_labels"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
fab:fab_addButtonColorNormal="@color/white"
fab:fab_addButtonColorPressed="@color/secondary_text"
fab:fab_addButtonPlusIconColor="@color/accent_dark"
fab:fab_addButtonSize="mini"
fab:fab_labelStyle="@style/menu_labels_style"
fab:fab_labelsPosition="right"
android:layout_gravity="right|bottom">
<com.getbase.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/white"
fab:fab_title="Label on the right"
fab:fab_colorPressed="@color/secondary_text"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="@color/white"
fab:fab_size="mini"
fab:fab_title="Another one on the right"
fab:fab_colorPressed="@color/secondary_text"/>
</com.getbase.floatingactionbutton.FloatingActionsMenu>
</FrameLayout>
</FrameLayout>