<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-380980011076825656.post286516756751546209..comments</id><updated>2010-08-25T10:17:57.225+02:00</updated><title type='text'>Comments on $cat /dev/stream: Android: Custom List Item with nested clickable Bu...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://devstream.stefanklumpp.com/feeds/286516756751546209/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html'/><author><name>Stefan Klumpp</name><uri>http://www.blogger.com/profile/02899343387413244345</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-1553861556676517393</id><published>2010-08-25T10:16:14.245+02:00</published><updated>2010-08-25T10:16:14.245+02:00</updated><title type='text'>@chrisonline

try onitemclick of listview

like th...</title><content type='html'>@chrisonline&lt;br /&gt;&lt;br /&gt;try onitemclick of listview&lt;br /&gt;&lt;br /&gt;like this&lt;br /&gt;&lt;br /&gt;yourList..setOnItemClickListener(new AdapterView.OnItemClickListener() {&lt;br /&gt;    public void onItemClick(AdapterView parent, View view, int position, long id) {&lt;br /&gt;//to do when item is clicked&lt;br /&gt;}&lt;br /&gt;};&lt;br /&gt;your whole listitem is then clickable</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/1553861556676517393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/1553861556676517393'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1282724174245#c1553861556676517393' title=''/><author><name>android</name><uri>http://www.blogger.com/profile/00036917335618351072</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-7407805045899893699</id><published>2010-08-25T10:11:51.300+02:00</published><updated>2010-08-25T10:11:51.300+02:00</updated><title type='text'>@chrisonline

try onitemclick of listview
your who...</title><content type='html'>@chrisonline&lt;br /&gt;&lt;br /&gt;try onitemclick of listview&lt;br /&gt;your whole listitem is then clickable</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7407805045899893699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7407805045899893699'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1282723911300#c7407805045899893699' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-1415092439185842592</id><published>2010-07-26T17:33:41.800+02:00</published><updated>2010-07-26T17:33:41.800+02:00</updated><title type='text'>Just use a simple "if (rowNumber % 2) { set color ...</title><content type='html'>Just use a simple &amp;quot;if (rowNumber % 2) { set color 1 } else { set color 2}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/1415092439185842592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/1415092439185842592'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1280158421800#c1415092439185842592' title=''/><author><name>Stefan Klumpp</name><uri>http://www.blogger.com/profile/02899343387413244345</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16104961862502439725'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-7222675062301054820</id><published>2010-07-26T12:13:38.593+02:00</published><updated>2010-07-26T12:13:38.593+02:00</updated><title type='text'>Hi Stefan, 

thank you for this helpful tutorial ....</title><content type='html'>Hi Stefan, &lt;br /&gt;&lt;br /&gt;thank you for this helpful tutorial .   &lt;br /&gt;I want to make my list look like yours, I would like alternate  the backround color of raws . would you please help me and indicate wich method can i use . or a source code if you have . &lt;br /&gt;thank you</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7222675062301054820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7222675062301054820'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1280139218593#c7222675062301054820' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-7291104797691457370</id><published>2010-06-15T16:10:03.785+02:00</published><updated>2010-06-15T16:10:03.785+02:00</updated><title type='text'>Hi Stefan!

I've tried your solution and its great...</title><content type='html'>Hi Stefan!&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tried your solution and its great, but i have a problem.&lt;br /&gt;&lt;br /&gt;After adding the .isClickable to the Layout my button is clickable but not the whole listview anymore.&lt;br /&gt;&lt;br /&gt;I need click on the ListView (expands more fields) and click on the button inside the ListView.&lt;br /&gt;&lt;br /&gt;Like the Gmail app.&lt;br /&gt;&lt;br /&gt;Do you have a solution?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7291104797691457370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7291104797691457370'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1276611003785#c7291104797691457370' title=''/><author><name>chrisonline</name><uri>http://www.blogger.com/profile/14206790906088683608</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-8052578321050500054</id><published>2010-05-13T06:05:44.169+02:00</published><updated>2010-05-13T06:05:44.169+02:00</updated><title type='text'>Thanks Stefan. This helped.

Punit</title><content type='html'>Thanks Stefan. This helped.&lt;br /&gt;&lt;br /&gt;Punit</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/8052578321050500054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/8052578321050500054'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1273723544169#c8052578321050500054' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-5957863146752669339</id><published>2010-05-10T18:06:08.415+02:00</published><updated>2010-05-10T18:06:08.415+02:00</updated><title type='text'>Hi,

Thx for this tutorial.

But, I have some ques...</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Thx for this tutorial.&lt;br /&gt;&lt;br /&gt;But, I have some questions ??&lt;br /&gt;&lt;br /&gt;When I click on the button, the OnClick in the Adapter works, but where I do the link with my Activity where is my List?&lt;br /&gt;&lt;br /&gt;I Have a list with one ImageView and TextView. When user click on textview , it open another Activity. When user click on Button, I would like to open a dialog.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/5957863146752669339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/5957863146752669339'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1273507568415#c5957863146752669339' title=''/><author><name>anais</name><uri>http://www.blogger.com/profile/03803159311548563643</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-2034898464765204247</id><published>2010-05-06T15:19:31.414+02:00</published><updated>2010-05-06T15:19:31.414+02:00</updated><title type='text'>Hey ajiree,

Thanks for sharing your improvement. ...</title><content type='html'>Hey ajiree,&lt;br /&gt;&lt;br /&gt;Thanks for sharing your improvement. Using just one Listener definitely makes sense.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/2034898464765204247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/2034898464765204247'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1273151971414#c2034898464765204247' title=''/><author><name>Stefan Klumpp</name><uri>http://www.blogger.com/profile/02899343387413244345</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16104961862502439725'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-7780271358064212487</id><published>2010-05-06T13:46:53.416+02:00</published><updated>2010-05-06T13:46:53.416+02:00</updated><title type='text'>Hi Stefan,

Thanks for this example - it saved me ...</title><content type='html'>Hi Stefan,&lt;br /&gt;&lt;br /&gt;Thanks for this example - it saved me many hours.&lt;br /&gt;&lt;br /&gt;I tried to optimize it a bit more and it seems to be working. Basic idea is to have only one View.OnClickListener per clickable element in all rows. So instead of calling &lt;i&gt;new View.OnClickListener()&lt;/i&gt; on every clickable in every row, I put these listeners as members of the adapter class. Since they operate on tags, they know which widget triggered them.&lt;br /&gt;&lt;br /&gt;public class MyAdapter extends BaseAdapter {&lt;br /&gt;&lt;br /&gt;private View.OnClickListener mMoreInfoClickListener = new View.OnClickListener() {&lt;br /&gt;//(...)&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;public View getView(int position, View convertView, ViewGroup parent) {&lt;br /&gt;//(...)&lt;br /&gt;holder.layout_bottom.setOnClickListener(mMoreInfoClickListener);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m pretty new to Java and Android, and I&amp;#39;m not sure if this is valid approach, but as I said it seems to be working nicely.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7780271358064212487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7780271358064212487'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1273146413416#c7780271358064212487' title=''/><author><name>ajree</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-1059618680991246396</id><published>2010-05-04T17:29:28.272+02:00</published><updated>2010-05-04T17:29:28.272+02:00</updated><title type='text'>@Mike 

extend ArrayAdapter instead of BaseAdapter...</title><content type='html'>@Mike &lt;br /&gt;&lt;br /&gt;extend ArrayAdapter instead of BaseAdapter. &lt;br /&gt;&lt;br /&gt;You can simply call remove(item) on the adapter. &lt;br /&gt;&lt;br /&gt;Don&amp;#39;t forget to call notifyDataSetChanged() on the adapter as well. This will update the ui.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/1059618680991246396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/1059618680991246396'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1272986968272#c1059618680991246396' title=''/><author><name>level32</name><uri>http://www.blogger.com/profile/11103901960767813087</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-8891167049173504117</id><published>2010-05-01T18:06:32.062+02:00</published><updated>2010-05-01T18:06:32.062+02:00</updated><title type='text'>Hey Mike,

Sorry, I've not worked with cursors/dat...</title><content type='html'>Hey Mike,&lt;br /&gt;&lt;br /&gt;Sorry, I&amp;#39;ve not worked with cursors/databases on Android, yet. So I&amp;#39;m not really able to help you at the moment. I&amp;#39;d suggest you ask your problem on http://stackoverflow.com/ - there you should usually get a response very quickly.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/8891167049173504117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/8891167049173504117'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1272729992062#c8891167049173504117' title=''/><author><name>Stefan Klumpp</name><uri>http://www.blogger.com/profile/02899343387413244345</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16104961862502439725'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-7533080408926766817</id><published>2010-04-04T05:36:05.759+02:00</published><updated>2010-04-04T05:36:05.759+02:00</updated><title type='text'>Stefan

Thanks for the tutorial.  One question, ho...</title><content type='html'>Stefan&lt;br /&gt;&lt;br /&gt;Thanks for the tutorial.  One question, how would you go about removing an item from the list when you click a button in that item?  I&amp;#39;m currently using a custom cursor adapter and in my onclicklistener I remove the item form the database and then do a cursor requery, but all the items in my list disappear.  If I go away and come back it correctly shows the remaining items.  It&amp;#39;s driving me crazy.  Do you have any ideas?  Thanks again.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7533080408926766817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7533080408926766817'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1270352165759#c7533080408926766817' title=''/><author><name>Mike</name><uri>http://www.blogger.com/profile/14908729685529342568</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-7592372385323983427</id><published>2010-03-27T01:52:01.888+01:00</published><updated>2010-03-27T01:52:01.888+01:00</updated><title type='text'>Hey snigdha. Sure. Just let me know what your prob...</title><content type='html'>Hey snigdha. Sure. Just let me know what your problem is and I&amp;#39;ll try to help.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7592372385323983427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/7592372385323983427'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1269651121888#c7592372385323983427' title=''/><author><name>Stefan Klumpp</name><uri>http://www.blogger.com/profile/02899343387413244345</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16104961862502439725'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-380980011076825656.post-6923361519296619480</id><published>2010-03-18T06:33:07.380+01:00</published><updated>2010-03-18T06:33:07.380+01:00</updated><title type='text'>Hi Stefan
it's a very helpful example indeed but c...</title><content type='html'>Hi Stefan&lt;br /&gt;it&amp;#39;s a very helpful example indeed but could you please elaborate as i am stuck with on click of a button in a list.&lt;br /&gt;thanks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/6923361519296619480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/380980011076825656/286516756751546209/comments/default/6923361519296619480'/><link rel='alternate' type='text/html' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html?showComment=1268890387380#c6923361519296619480' title=''/><author><name>snigdha</name><uri>http://www.blogger.com/profile/10250225918003096925</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://devstream.stefanklumpp.com/2009/11/android-custom-list-item-with-nested.html' ref='tag:blogger.com,1999:blog-380980011076825656.post-286516756751546209' source='http://www.blogger.com/feeds/380980011076825656/posts/default/286516756751546209' type='text/html'/></entry></feed>