Note that there are some explanatory texts on larger screens.

plurals
  1. POonListItemClick not called on ListActivity
    primarykey
    data
    text
    <p>My activity extends the ListActivvity and I added the onListItemClick () inside it but listitem click is not getting called.</p> <p>When I inflate my view and returning that view inside the getView () method listitem click is not getting called but when I did not inflate view and directly call the super method it works fine.</p> <p>CustomArrayAdapter.java</p> <pre><code>package com.mobileinsight.presenter.form; import android.content.Context; import android.text.Html; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.mobileinsight.R; import com.mobileinsight.common.SimpleMap; import com.mobileinsight.common.Util; public class CustomArrayAdapter extends ArrayAdapter&lt;SimpleMap&gt; { private Product[] objects; private Context _this; public CustomArrayAdapter(Context context, int resource, Product[] objects) { super(context, resource, objects); this.objects = objects; this._this = context; } @Override public View getView(int position, View convertView, ViewGroup parent) { View rowView = convertView; if (convertView == null) { LayoutInflater inflater = (LayoutInflater) _this .getSystemService(Context.LAYOUT_INFLATER_SERVICE); rowView = inflater.inflate(R.layout.list_row, parent, false); } else { rowView = convertView; } TextView textView = (TextView) rowView.findViewById(R.id.text1); TextView detailview = (TextView) rowView.findViewById(R.id.text2); textView.setText("Text 1")); // textView.setClickable(true); textView.setMovementMethod(LinkMovementMethod.getInstance()); detailview.setText(objects[position].getDetails()); return rowView; // not working // return super.getview(); // Working } } </code></pre> <p>list_row.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" &gt; &lt;TextView android:id="@+id/text1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:layout_gravity="center_vertical|left" android:layout_margin="6dip" android:layout_weight="2" android:ellipsize="end" android:gravity="center_vertical|left" android:singleLine="false" android:textAppearance="?android:attr/textAppearanceLarge" /&gt; &lt;TextView android:id="@+id/text2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:layout_gravity="center_vertical|right" android:layout_margin="6dip" android:layout_weight="0" android:ellipsize="none" android:gravity="center_vertical|right" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceLarge" /&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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