1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

multi select in cutom listview


Last Updated:

  1. nokachouik

    nokachouik Member This Topic's Starter

    Joined:
    Nov 16, 2010
    Messages:
    7
    Likes Received:
    0
    Hi everybody,

    I have a problem with my listview.
    My listview is a custom listview with one imageview and two textview.
    And i would like to know how to select some of items in my list using checkbox. I've tried to enable the CHOICE_MODE_MULTIPLE but without success.

    this is my layout
    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    4.     android:layout_width="fill_parent"
    5.     android:layout_height="?android:attr/listPreferredItemHeight"
    6.     android:padding="6dip">
    7.     <ImageView
    8.         android:id="@+id/icon"
    9.         android:layout_width="60sp"
    10.         android:layout_height="60sp"
    11.         android:layout_marginRight="6dip"
    12.         android:src="@drawable/contact_icon2"
    13.         />
    14.     <LinearLayout
    15.         android:orientation="vertical"
    16.         android:layout_width="0dip"
    17.         android:layout_weight="1"
    18.         android:layout_height="fill_parent">
    19.         <CheckedTextView
    20.             android:id="@+id/toptext"
    21.             android:layout_width="fill_parent"
    22.             android:layout_height="0dip"
    23.             android:layout_weight="1"
    24.             android:gravity="center_vertical"
    25.             android:textSize="20sp"
    26.         />
    27.         <TextView
    28.             android:layout_width="fill_parent"
    29.             android:layout_height="0dip"
    30.             android:layout_weight="1"
    31.             android:id="@+id/bottomtext"
    32.             android:singleLine="true"
    33.             android:ellipsize="marquee"
    34.         />        
    35.     </LinearLayout>
    36. </LinearLayout>
    37.  

    Someone can help me

    thanks in advance.
     

    Advertisement
  2. nokachouik

    nokachouik Member This Topic's Starter

    Joined:
    Nov 16, 2010
    Messages:
    7
    Likes Received:
    0
    nobody knows how to do that?
     

Share This Page

Loading...