Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I Suppose I might have found the solution.</p> <p>All these above solutions did not worked for me.</p> <p>But then, what I did was add onClickListener to actual view which I return from adapter and BAM it started working for me.</p> <p>Here is the sample code: </p> <p>May layout XML (Not complete one....)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/details" android:layout_width="fill_parent" android:layout_height="wrap_content"&gt; &lt;ScrollView android:id = "@+id/scrolling" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;RelativeLayout android:paddingBottom="30dip" android:layout_width="fill_parent" android:layout_height="wrap_content"&gt; &lt;ImageView android:id="@+id/listingIcon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true"/&gt; ............ &lt;/ScrollView&gt; &lt;SlidingDrawer android:id="@+id/slidingDrawerShowMore" android:layout_width="match_parent" android:layout_height="match_parent" android:topOffset="132dip" android:handle="@+id/handle" android:content="@+id/content"&gt; &lt;LinearLayout android:id="@+id/handle" android:padding = "5dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:color/black"&gt; &lt;TextView android:id="@+id/title" android:layout_alignParentRight="true" android:textSize="14dp" android:layout_below="@id/rate" android:singleLine="true" android:textColor="#3F48CC" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/show_more"/&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center" android:background="@android:color/black"&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_gravity="center_vertical" android:background="@drawable/dark_header"&gt; &lt;TextView android:id="@+id/otherTitle" android:layout_alignParentRight="true" android:layout_below="@id/rate" android:singleLine="true" android:textSize="21px" android:paddingLeft="10px" android:textColor="#EBEBEB" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_weight="0.6" android:text="@string/someString"/&gt; &lt;ProgressBar android:id="@+id/pbar" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@android:style/Widget.ProgressBar.Small" android:layout_gravity="center_vertical"/&gt; &lt;/LinearLayout&gt; &lt;ListView android:id="@+id/listview" android:layout_width="fill_parent" android:layout_height="fill_parent"/&gt; &lt;/LinearLayout&gt; &lt;/SlidingDrawer&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Now to handle click events all I had to do was to add onClickListener in my adapter</p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { convertView.setOnClickListener(this); } </code></pre> <p>That's it. Problem is I could not get my onItemClickListener working for this ListView. But right now on click listener works for me. One day I would love to find out reason behind this.</p>
 

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