<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Hozzászólások: CodePlay</title>
	<atom:link href="http://codeplay.hu/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeplay.hu</link>
	<description>Kitaláljuk, lefejlesztjük, telepítjük</description>
	<lastBuildDate>Tue, 13 Dec 2011 09:56:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>Android onItemClick probléma ListView és Button használatakor: hozzászólás (codeplay)</title>
		<link>http://codeplay.hu/developer/2010/07/android-onitemclick-problema-listview-es-button-hasznalatakor/comment-page-1/#comment-6431</link>
		<dc:creator>codeplay</dc:creator>
		<pubDate>Tue, 13 Dec 2011 09:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=40#comment-6431</guid>
		<description>Thanks, I&#039;m checking. First look I think it isn&#039;t good because &lt;code&gt;ListAdapter.getView()&lt;/code&gt; will run on all list element which is on the screen so &lt;code&gt;v.getId()&lt;/code&gt; will be the id of the last button not what you clicked.
The point there is only one button in the memory and UI redraw it for all list element. You can&#039;t use this button properties only it&#039;s parent.

&lt;code&gt;int myButtonID = v.getId()&lt;/code&gt; will return the last drawn button id not what you clicked.

But I will check...</description>
		<content:encoded><![CDATA[<p>Thanks, I&#8217;m checking. First look I think it isn&#8217;t good because <code>ListAdapter.getView()</code> will run on all list element which is on the screen so <code>v.getId()</code> will be the id of the last button not what you clicked.<br />
The point there is only one button in the memory and UI redraw it for all list element. You can&#8217;t use this button properties only it&#8217;s parent.</p>
<p><code>int myButtonID = v.getId()</code> will return the last drawn button id not what you clicked.</p>
<p>But I will check&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Android onItemClick probléma ListView és Button használatakor: hozzászólás (thrash)</title>
		<link>http://codeplay.hu/developer/2010/07/android-onitemclick-problema-listview-es-button-hasznalatakor/comment-page-1/#comment-6375</link>
		<dc:creator>thrash</dc:creator>
		<pubDate>Sun, 11 Dec 2011 12:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=40#comment-6375</guid>
		<description>There is a much easier way to do the same.
In your ListAdapter getView method:

        Button b = (Button) v.findViewById(R.id.myButton);
        b.setId(item.getEntityValues().getAsInteger(&quot;LIST_ID&quot;));

My list items are Entity.

Define onClick event in your layout xml, and then in the Activity class in the onClick method:

	public void buttonClick(View v) {
		int myButtonID = v.getId();
	}

For me works fine.</description>
		<content:encoded><![CDATA[<p>There is a much easier way to do the same.<br />
In your ListAdapter getView method:</p>
<p>        Button b = (Button) v.findViewById(R.id.myButton);<br />
        b.setId(item.getEntityValues().getAsInteger(&#8220;LIST_ID&#8221;));</p>
<p>My list items are Entity.</p>
<p>Define onClick event in your layout xml, and then in the Activity class in the onClick method:</p>
<p>	public void buttonClick(View v) {<br />
		int myButtonID = v.getId();<br />
	}</p>
<p>For me works fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>PHP fejlesztői környezet OSX-en: hozzászólás (junkiest)</title>
		<link>http://codeplay.hu/developer/2011/10/osx-php/comment-page-1/#comment-5480</link>
		<dc:creator>junkiest</dc:creator>
		<pubDate>Wed, 16 Nov 2011 11:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=215#comment-5480</guid>
		<description>Nice tutorial.... thanks !!!</description>
		<content:encoded><![CDATA[<p>Nice tutorial&#8230;. thanks !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Jelszavak kezelése cégen belül: hozzászólás (cett)</title>
		<link>http://codeplay.hu/administration/2010/10/jelszavak-kezelese-cegen-belul/comment-page-1/#comment-4492</link>
		<dc:creator>cett</dc:creator>
		<pubDate>Fri, 30 Sep 2011 07:38:40 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=97#comment-4492</guid>
		<description>Keepass. rengeteg platformra van.</description>
		<content:encoded><![CDATA[<p>Keepass. rengeteg platformra van.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Ruby on Rails kezdetek: hozzászólás (Greg)</title>
		<link>http://codeplay.hu/developer/2011/01/ruby-on-rails/comment-page-1/#comment-4345</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Sun, 18 Sep 2011 19:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=127#comment-4345</guid>
		<description>Ha Ruby es Rails, akkor szerintem a Windows kornyezet felejtos. Vagy Mac, vagy Unix akar egy VirtualBox-on. Sok fejfajast megsporolsz majd vele :). En PHP-ban fejlesztek kb 5 eve,Ruby-val es Rails-el kb 2 eve foglalkozom, es ha lehet tanacsot adni, akkor Rails. Vagy ha mindenkeppen PHP akkor inkabb Yii, mit Zend framework.</description>
		<content:encoded><![CDATA[<p>Ha Ruby es Rails, akkor szerintem a Windows kornyezet felejtos. Vagy Mac, vagy Unix akar egy VirtualBox-on. Sok fejfajast megsporolsz majd vele <img src='http://codeplay.hu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . En PHP-ban fejlesztek kb 5 eve,Ruby-val es Rails-el kb 2 eve foglalkozom, es ha lehet tanacsot adni, akkor Rails. Vagy ha mindenkeppen PHP akkor inkabb Yii, mit Zend framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Android onItemClick probléma ListView és Button használatakor: hozzászólás (Tomasz Prażuch)</title>
		<link>http://codeplay.hu/developer/2010/07/android-onitemclick-problema-listview-es-button-hasznalatakor/comment-page-1/#comment-3491</link>
		<dc:creator>Tomasz Prażuch</dc:creator>
		<pubDate>Fri, 05 Aug 2011 10:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=40#comment-3491</guid>
		<description>I have had a similar problem: This hint could be useful:
=== part of OnCreate method of the ListActivity class ===

cursor = baza.rawQuery(&quot;SELECT ClientName_id as _id, City, Street, HomeNr, ScanDate, Notes FROM Klienci ORDER BY ClientName_id&quot;,null);
startManagingCursor(cursor);
adapter = new SimpleCursorAdapter(
        		this,
          	    R.layout.list_name,
          	    cursor,
          	    new String[] { &quot;_id&quot;, &quot;City&quot;, &quot;Street&quot;, &quot;HomeNr&quot;, &quot;ScanDate&quot;, &quot;Notes&quot; },
          	    new int[] { R.id.clientname, R.id.city, R.id.street, R.id.homenr, R.id.scanDate, R.id.notes });
this.setListAdapter(adapter);

ListView lv = getListView();
lv.setOnItemClickListener(
    	new OnItemClickListener() {
    		@Override
    		public void onItemClick(AdapterView parent, View view, int position, long id) {
    	        // When clicked, show a toast with the text of a TextView with id &#039;clientname&#039;
    		String txt  = ((TextView)view.findViewById(R.id.clientname)).getText().toString();
    		Toast.makeText(getApplicationContext(), txt, Toast.LENGTH_SHORT).show();
    		}
	});

Rest of the code should be clear. Cheers!</description>
		<content:encoded><![CDATA[<p>I have had a similar problem: This hint could be useful:<br />
=== part of OnCreate method of the ListActivity class ===</p>
<p>cursor = baza.rawQuery(&#8220;SELECT ClientName_id as _id, City, Street, HomeNr, ScanDate, Notes FROM Klienci ORDER BY ClientName_id&#8221;,null);<br />
startManagingCursor(cursor);<br />
adapter = new SimpleCursorAdapter(<br />
        		this,<br />
          	    R.layout.list_name,<br />
          	    cursor,<br />
          	    new String[] { &#8220;_id&#8221;, &#8220;City&#8221;, &#8220;Street&#8221;, &#8220;HomeNr&#8221;, &#8220;ScanDate&#8221;, &#8220;Notes&#8221; },<br />
          	    new int[] { R.id.clientname, R.id.city, R.id.street, R.id.homenr, R.id.scanDate, R.id.notes });<br />
this.setListAdapter(adapter);</p>
<p>ListView lv = getListView();<br />
lv.setOnItemClickListener(<br />
    	new OnItemClickListener() {<br />
    		@Override<br />
    		public void onItemClick(AdapterView parent, View view, int position, long id) {<br />
    	        // When clicked, show a toast with the text of a TextView with id &#8216;clientname&#8217;<br />
    		String txt  = ((TextView)view.findViewById(R.id.clientname)).getText().toString();<br />
    		Toast.makeText(getApplicationContext(), txt, Toast.LENGTH_SHORT).show();<br />
    		}<br />
	});</p>
<p>Rest of the code should be clear. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Android onItemClick probléma ListView és Button használatakor: hozzászólás (Serge)</title>
		<link>http://codeplay.hu/developer/2010/07/android-onitemclick-problema-listview-es-button-hasznalatakor/comment-page-1/#comment-3080</link>
		<dc:creator>Serge</dc:creator>
		<pubDate>Thu, 07 Jul 2011 23:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=40#comment-3080</guid>
		<description>Hi Guys,

I am having a problem here .
What I want is to have a button on every listview, and also when i click the button it will show a toast containing the writing on that specific view and do the same for every single one of them.
can someone help me please.. 

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>I am having a problem here .<br />
What I want is to have a button on every listview, and also when i click the button it will show a toast containing the writing on that specific view and do the same for every single one of them.<br />
can someone help me please.. </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Android onItemClick probléma ListView és Button használatakor: hozzászólás (ridalm)</title>
		<link>http://codeplay.hu/developer/2010/07/android-onitemclick-problema-listview-es-button-hasznalatakor/comment-page-1/#comment-2945</link>
		<dc:creator>ridalm</dc:creator>
		<pubDate>Thu, 23 Jun 2011 18:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=40#comment-2945</guid>
		<description>I encountered the same problem recently.
I have solved the problem such that I used the listview position variable as setTag parameter.
Example:

public View getView(int position, View convertView, ViewGroup parent) {
   view.setTag(position);
   view.setOnClickListener(new View.OnClickListener() {
		             public void onClick(View v) {
		            	 String pos=v.getTag().toString();
                                 Toast.makeText(Sehir.this, &quot;clicked &quot;+pos , 0).show();
		              }
		    });

}</description>
		<content:encoded><![CDATA[<p>I encountered the same problem recently.<br />
I have solved the problem such that I used the listview position variable as setTag parameter.<br />
Example:</p>
<p>public View getView(int position, View convertView, ViewGroup parent) {<br />
   view.setTag(position);<br />
   view.setOnClickListener(new View.OnClickListener() {<br />
		             public void onClick(View v) {<br />
		            	 String pos=v.getTag().toString();<br />
                                 Toast.makeText(Sehir.this, &#8220;clicked &#8220;+pos , 0).show();<br />
		              }<br />
		    });</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Jelszavak kezelése cégen belül: hozzászólás (János)</title>
		<link>http://codeplay.hu/administration/2010/10/jelszavak-kezelese-cegen-belul/comment-page-1/#comment-2240</link>
		<dc:creator>János</dc:creator>
		<pubDate>Wed, 27 Apr 2011 18:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=97#comment-2240</guid>
		<description>Dropbox-szal annyi a baj, hogy ha 1 valaki törli, mindenkinél törlődik, így mindig kell egy biztonsági másolat 1 valaki gépén.</description>
		<content:encoded><![CDATA[<p>Dropbox-szal annyi a baj, hogy ha 1 valaki törli, mindenkinél törlődik, így mindig kell egy biztonsági másolat 1 valaki gépén.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Facebook alkalmazás iPhone4 nyereményjátékhoz: hozzászólás (Rapi Kitti)</title>
		<link>http://codeplay.hu/news/2010/11/facebook-alkalmazas-iphone4-nyeremenyjatekhoz/comment-page-1/#comment-508</link>
		<dc:creator>Rapi Kitti</dc:creator>
		<pubDate>Wed, 01 Dec 2010 18:55:28 +0000</pubDate>
		<guid isPermaLink="false">http://codeplay.hu/?p=106#comment-508</guid>
		<description>Nagyon jóóó =D</description>
		<content:encoded><![CDATA[<p>Nagyon jóóó =D</p>
]]></content:encoded>
	</item>
</channel>
</rss>

