i made an app which includes ListFragment

every item includes checkbox and textview

problem is when i click on the line, the checkbox is selected/
deselected and and thus
the onItemClick of the list is not working.

anyone has an idea how can i change behavior of this? i want to be
able to click on either the line or the checkbox seperatly.

thats the listItem.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android";
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <CheckBox
                android:id="@+id/checkbox"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="" />
        <TextView
                android:text=""
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:id="@+id/label"
                android:textSize="30px"></TextView>
</LinearLayout>


and this is main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <fragment
                class="com.eXbrowse.MyListFrag"
            android:id="@+id/foldersListFrag"
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent" />
</LinearLayout>



ill be glad to get some help,

on the ListFragment i override:

public void onListItemClick(ListView l, View v, int position, long id)


the problem is only the checkbox is working
and onListItemClick is not

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to