title: FloatingActionButton cannot be cast to android
body: <p>i have an error &quot;FloatingActionButton cannot be cast to android&quot; in fragment</p>
  <p>this is my button :</p>
  <pre><code>&lt;android.support.design.widget.FloatingActionButton
          android:id=&quot;@+id/kirim&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_gravity=&quot;bottom|end&quot;
          android:layout_margin=&quot;@dimen/fab_margin&quot;
          app:srcCompat=&quot;@android:drawable/ic_menu_upload&quot; /&gt;
  </code></pre>
  <p>and this is code to call button</p>
  <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
  
      View rootView = inflater.inflate(R.layout.fragment_chat, container, false);
  
  kirim = (Button) rootView.findViewById(R.id.kirim);
  
  kirim.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              simpan();
  
          }
      });
  return rootView;
  }
  </code></pre>