<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:paddingRight="6dip"
android:paddingLeft="6dip"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:gravity="center_vertical" >
<ImageView android:id="@+id/app_icon"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:layout_marginLeft="5dip"
android:layout_marginRight="11dip"
android:layout_gravity="center_vertical"
android:scaleType="fitCenter"/>
<RelativeLayout android:layout_width="0dp"
android:layout_weight="0.7"
android:clickable="true"
android:layout_height="wrap_content">
<TextView android:id="@+id/app_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="marquee"
android:layout_alignParentLeft="true"
android:layout_marginBottom="2dip" />
<TextView android:id="@+id/app_size"
android:layout_marginTop="-4dip"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/app_name"
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>
<CheckBox android:id="@+id/btnCheckbox"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_width="46dp"
android:layout_height="46dp"
android:layout_alignParentRight="true"
android:layout_marginTop="7dp"
android:layout_marginRight="0dp"
/>
</LinearLayout>
2011/5/16 a a <[email protected]>:
> Dear All,
>
> Why the following function can't work when i click the listview item?
>
> @Override
> protected void onListItemClick(ListView l, View v, int position, long id)
> {
> Log.d("aaa", "onListItemClick" + position);
> }
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en