how to set onclick method with linearlayout?
<p>im creating application i post my question yesterday how to make row clickable so user click anywhere in row is start new activity see my last post <a href="http://stackoverflow.com/questions/15591147/how-to-start-activity-by-click-any-where-on-row">how to start activity by click any where on row</a> some one give me solution to do like this below but is give error ""The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new OnClickListener(){})""</p>

<pre><code>  LinearLayout menu_photos = (LinearLayout )findViewById(R.id.picture_part);
   menu_photos.setOnClickListener(new OnClickListener() {      
    @Override
    public void onClick(View v) {
        Intent picture_intent = new Intent(CurrentActivity.this,PictureActivity.class);
    startActivity(picture_intent );     
    }
   });




                &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:background="@drawable/main_background"
   android:orientation="vertical" &gt;

   &lt;include
 android:id="@id/includeTop"
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:layout_alignParentTop="true"
 layout="@layout/private_space_title" /&gt;

 &lt;ScrollView
  android:layout_width="fill_parent"
   android:layout_height="fill_parent" &gt;

     &lt;LinearLayout
    android:id="@id/mail_list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/main_list_bg"
    android:orientation="vertical"
    android:paddingBottom="10.0dip"
    android:paddingLeft="20.0dip"
    android:paddingRight="20.0dip"
    android:paddingTop="15.0dip" &gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" &gt;

        &lt;LinearLayout
            android:id="@id/picture_part"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_selector"
            android:clickable="true"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingRight="10.0dip" &gt;

            &lt;ImageView
                android:id="@id/left_icon1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="10.0dip"
                android:src="@drawable/icon_picture" /&gt;

            &lt;TextView
                android:id="@id/textView1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1.0"
                android:ellipsize="end"
                android:singleLine="true"
                android:text="@string/function_img_management"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@color/white" /&gt;

            &lt;ImageView
                android:id="@id/right_icon1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/listview_arrow" /&gt;
        &lt;/LinearLayout&gt;

        &lt;ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/list_view_divider" /&gt;

        &lt;LinearLayout
            android:id="@id/video_part"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_selector"
            android:clickable="true"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingRight="10.0dip" &gt;

            &lt;ImageView
                android:id="@id/left_icon2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="10.0dip"
                android:src="@drawable/icon_video" /&gt;

            &lt;TextView
                android:id="@id/textView2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1.0"
                android:ellipsize="end"
                android:singleLine="true"
                android:text="@string/function_video_management"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@color/white" /&gt;

            &lt;ImageView
                android:id="@id/right_icon2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/listview_arrow" /&gt;
        &lt;/LinearLayout&gt;

        &lt;ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/list_view_divider" /&gt;

        &lt;LinearLayout
            android:id="@id/sms_call_part"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_selector"
            android:clickable="true"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingRight="10.0dip" &gt;

            &lt;RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" &gt;

                &lt;ImageView
                    android:id="@id/left_icon2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="10.0dip"
                    android:src="@drawable/icon_sms_call" /&gt;

                &lt;TextView
                    android:id="@id/unread_count"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignRight="@id/left_icon2"
                    android:layout_marginRight="5.0dip"
                    android:layout_marginTop="3.0dip"
                    android:background="@drawable/counter"
                    android:gravity="center"
                    android:textColor="@color/white"
                    android:visibility="visible" /&gt;
            &lt;/RelativeLayout&gt;

            &lt;TextView
                android:id="@id/textView3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1.0"
                android:ellipsize="end"
                android:singleLine="true"
                android:text="@string/function_sms_management"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@color/white" /&gt;

            &lt;ImageView
                android:id="@id/right_icon3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/listview_arrow" /&gt;
        &lt;/LinearLayout&gt;

        &lt;ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/list_view_divider" /&gt;

        &lt;LinearLayout
            android:id="@id/private_contact_part"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_selector"
            android:clickable="true"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingRight="10.0dip" &gt;

            &lt;ImageView
                android:id="@id/left_icon4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="10.0dip"
                android:src="@drawable/icon_contact" /&gt;

            &lt;TextView
                android:id="@id/textView4"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1.0"
                android:ellipsize="end"
                android:singleLine="true"
                android:text="@string/function_privacy_management"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@color/white" /&gt;

            &lt;ImageView
                android:id="@id/right_icon4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/listview_arrow" /&gt;
        &lt;/LinearLayout&gt;

        &lt;ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/list_view_divider" /&gt;

        &lt;LinearLayout
            android:id="@id/break_in_part"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_selector"
            android:clickable="true"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingRight="10.0dip" &gt;

            &lt;RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" &gt;

                &lt;ImageView
                    android:id="@id/left_icon5"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="10.0dip"
                    android:src="@drawable/icon_break_in" /&gt;

                &lt;TextView
                    android:id="@id/login_record_main_unread_count"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignRight="@id/left_icon5"
                    android:layout_marginRight="5.0dip"
                    android:layout_marginTop="3.0dip"
                    android:background="@drawable/counter"
                    android:gravity="center"
                    android:textColor="@color/white"
                    android:visibility="visible" /&gt;
            &lt;/RelativeLayout&gt;

            &lt;TextView
                android:id="@id/textView5"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1.0"
                android:ellipsize="end"
                android:singleLine="true"
                android:text="@string/function_break_in_management"
                android:textAppearance="?android:textAppearanceMedium"
                android:textColor="@color/white" /&gt;

            &lt;ImageView
                android:id="@id/right_icon5"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/listview_arrow" /&gt;
        &lt;/LinearLayout&gt;

        &lt;ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/list_view_divider" /&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="90.0dip"
        android:layout_weight="1.0"
        android:gravity="center" &gt;

        &lt;Button
            android:id="@id/member_up_btn"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="20.0dip"
            android:layout_marginRight="20.0dip"
            android:background="@drawable/upgrade_selector"
            android:text="@string/main_upgrade_button"
            android:textSize="18.0sp" /&gt;
    &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
 &lt;/ScrollView&gt;

  &lt;/LinearLayout&gt;
</code></pre>
