There is an ExpandableListView with a custom adapter: For Child:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="2dp" android:layout_marginTop="2dp" android:background="@drawable/border_one_task" android:orientation="horizontal" > <CheckBox android:id="@+id/checkbox_task" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/textview_task_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="2dp" android:layout_marginLeft="2dp" android:layout_marginTop="2dp" android:gravity="left" android:text="Задача1" android:textAppearance="?android:attr/textAppearanceLarge" /> <LinearLayout android:layout_width="match_parent" android:layout_height="28sp" android:layout_marginBottom="2dp" > <TextView android:id="@+id/textview_task_date" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginRight="4dp" android:gravity="center_vertical" android:text="10.12.2014" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#0000ff" /> <ImageView android:id="@+id/imageview_task_map" android:layout_width="25sp" android:layout_height="25sp" android:src=" @android :drawable/ic_menu_mapmode" /> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout>
It is necessary to handle the event of clicking on the CheckBox. At the same time it is necessary to call the method from the caller of activation (To refresh the data). How can this be done?