Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom listview row focus issue android
    text
    copied!<p>I have trying to solve this problem from last few days but no success. I have gone through lot of solution that are already available but non is working for me. I have customer list view and custom row. I am using simple cursor adaptor to populate the list view. In my custom row I have three images view and one text view. one of the view is click able that open the popup window and row navigate to next fragment. My problem is that click able image does not respond until I select the whole row. When I select row it become click able. </p> <p>row </p> <pre><code> &lt;ImageView android:id="@+id/iv_LvRow_speedmap_PIcon" android:layout_width="0dip" android:layout_height="50dip" android:layout_weight="0.20" android:contentDescription="@string/todo" android:paddingLeft="10dip" android:src="@drawable/arrow4" /&gt; &lt;TextView android:id="@+id/tv_LVRow_SpeedMap_PDesc" android:layout_width="0dip" android:layout_height="50dip" android:layout_weight="0.60" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:scrollHorizontally="true" android:singleLine="true" android:text="@string/textview" android:textColor="@color/black" android:textSize="14sp" /&gt; &lt;ImageView android:id="@+id/ib_LvRow_SpeedMap_InfoIcon" android:layout_width="0dip" android:layout_height="50dip" android:layout_weight="0.10" android:clickable="true" android:contentDescription="@string/todo" android:duplicateParentState="false" android:focusable="false" android:focusableInTouchMode="false" android:src="@drawable/info_icon" /&gt; &lt;ImageView android:id="@+id/imgView_ArrowImg_speedMap" android:layout_width="0dip" android:layout_height="50dip" android:layout_weight="0.10" android:contentDescription="@string/todo" android:src="@drawable/arrow4" /&gt; &lt;/LinearLayout&gt; ListView lv = getListView(); // lv.setItemsCanFocus(true); // lv.setClickable(true); // lv.setFocusable(true); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; arg0, View v, int arg2, long arg3) { final String where = "id = " + Long.toString(arg3); ImageView iv = (ImageView) v .findViewById(R.id.ib_LvRow_SpeedMap_InfoIcon); // iv.setClickable(true); // iv.setFocusable(true); iv.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { System.out.println("id2"); String[] projection = { "name", "description" }; String selection = where; Cursor cursor = null; cursor = getActivity().getContentResolver().query( DatabaseContentProvider.CONTENT_URI_CONCERNS, projection, selection, null, null); cursor.moveToFirst(); if (cursor.getCount() &gt; 0) { String name = cursor.getString(cursor .getColumnIndex("name")); System.out.println("name" + name); String description = cursor.getString(cursor .getColumnIndex("description")); System.out.println("description" + description); info(name, description, v); } } }); } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload