title: Fragment not letting me use setOnClickListener
body: <p>I am trying to use setOnClickListener on my fragment but it is not letting me and saying I need to implement onClick into onClickListener, which I have... Can someone please explain what I did wrong?</p>
  
  <p>Fragment code:</p>
  
  <pre><code>package layout;
  
  
  import android.graphics.drawable.Drawable;
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  
  
  import test.testing.R;
  
  /**
   * A simple {@link Fragment} subclass.
   */
  public class BlankFragment extends Fragment implements View.OnClickListener{
  
  
      public BlankFragment() {
          // Required empty public constructor
      }
  
      ImageView event1 = (ImageView) getView().findViewById(R.id.gray_circle1);
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          View v = inflater.inflate(R.layout.fragment_blank, container, false);
          LinearLayout event = (LinearLayout) v.findViewById(R.id.ev1);
          event.setOnClickListener(new onClickListener()
          {
              @Override
              public void onClick(View v){
                  event1.setBackgroundResource(R.drawable.colorcircle);
              }
          });
          return v;
      }
  
  }
  </code></pre>
  
  <p>Fragment XML:
      </p>
  
  <pre><code>    &lt;!-- TODO: Update blank fragment layout --&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="20dp"
          android:id="@+id/ev1"
          android:onClick="activate"
          android:orientation="horizontal"&gt;
          &lt;ImageView
              android:layout_width="50dp"
              android:layout_height="50dp"
              android:id="@+id/gray_circle1"
              android:background="@drawable/graycircle"/&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="match_parent"
              android:paddingLeft="20dp"
              android:gravity="center_vertical"
              android:textColor="#ffffff"
              android:text="Event 1"/&gt;
      &lt;/LinearLayout&gt;
      &lt;!-- Event 2 --&gt;
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="20dp"
          android:orientation="horizontal"&gt;
          &lt;ImageView
              android:layout_width="50dp"
              android:layout_height="50dp"
              android:background="@drawable/graycircle"/&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="match_parent"
              android:paddingLeft="20dp"
              android:gravity="center_vertical"
              android:textColor="#ffffff"
              android:text="Event 1"/&gt;
  
      &lt;/LinearLayout&gt;
      &lt;!-- Event 3 --&gt;
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginBottom="20dp"
          android:orientation="horizontal"&gt;
          &lt;ImageView
              android:layout_width="50dp"
              android:layout_height="50dp"
              android:background="@drawable/graycircle"/&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="match_parent"
              android:paddingLeft="20dp"
              android:gravity="center_vertical"
              android:textColor="#ffffff"
              android:text="Event 1"/&gt;
  
      &lt;/LinearLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Thank you.</p>