title: NullPointerException on setLayoutParams FloatingButton
body: <p>I want to show floating button when the users selects option from the listview. On the Items selected in want to display the floating button otherwise the floating button should be hidden. Here is the code I working with</p>
  
  <pre><code>FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
              fab.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      // Click action
                      ParseObject message = createMessage();
                      if (message == null) {
                          // error
                          AlertDialog.Builder builder = new AlertDialog.Builder(RecipientsActivity.this);
                          builder.setMessage(R.string.error_selecting_file)
                                  .setTitle(R.string.error_selecting_file_title)
                                  .setPositiveButton(android.R.string.ok, null);
                          AlertDialog dialog = builder.create();
                          dialog.show();
                      }
                      else {
                          send(message);
                          finish();
                      }
                  }
              });   
  
   @Override
              protected void onListItemClick(ListView l, View v, int position, long id) {
                  super.onListItemClick(l, v, position, id);
  
                  if (l.getCheckedItemCount() &gt; 0) {
                      CoordinatorLayout.LayoutParams p = new CoordinatorLayout.LayoutParams(CoordinatorLayout.LayoutParams.WRAP_CONTENT, CoordinatorLayout.LayoutParams.WRAP_CONTENT);
                      p.anchorGravity = Gravity.BOTTOM | Gravity.END;
                      p.setAnchorId(R.id.colayout);
                      fab.setLayoutParams(p);
                      fab.setVisibility(View.VISIBLE);
                  }
  
              }
  </code></pre>
  
  <p>Here is the layout resource file</p>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout
      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:orientation="vertical"
      android:id="@+id/colayout"
      tools:context=".RecipientsActivity" &gt;
  
      &lt;ListView
          android:id="@android:id/list"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true" &gt;
      &lt;/ListView&gt;
  
      &lt;TextView
          android:id="@android:id/empty"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="@string/empty_recipients_list_message" /&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="bottom|center"
          android:visibility="gone"
          android:clickable="true"
          android:src="@drawable/ic_checkbox_marked_circle_outline_white_48dp" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Here is the Logcat</p>
  
  <pre><code> java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.FloatingActionButton.setLayoutParams(android.view.ViewGroup$LayoutParams)' on a null object reference
                                                                                at com.teamtreehouse.ribbit.RecipientsActivity.onListItemClick(RecipientsActivity.java:129)
                                                                                at android.app.ListActivity$2.onItemClick(ListActivity.java:319)
                                                                                at android.widget.AdapterView.performItemClick(AdapterView.java:310)
                                                                                at android.widget.AbsListView.performItemClick(AbsListView.java:1214)
  
  
         at 
  </code></pre>