<?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>
	〈繼承Application達到Global Variable〉的留言	</title>
	<atom:link href="https://noter.tw/1911/%E7%B9%BC%E6%89%BFapplication%E9%81%94%E5%88%B0global-variable/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Tue, 02 Jul 2019 05:44:08 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>
	<item>
		<title>
		留言者: Hans		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-180</link>

		<dc:creator><![CDATA[Hans]]></dc:creator>
		<pubDate>Tue, 29 May 2012 10:12:48 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-180</guid>

					<description><![CDATA[回覆的對象為「&lt;a href=&quot;https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-179&quot;&gt;SAM&lt;/a&gt;」。

Dear SAM:
為什麼不是每次發生 ... 小蛙就不清楚了！
恭喜您已經解決囉！^____^]]></description>
			<content:encoded><![CDATA[<p>回覆的對象為「<a href="https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-179" data-wpel-link="internal">SAM</a>」。</p>
<p>Dear SAM:<br />
為什麼不是每次發生 &#8230; 小蛙就不清楚了！<br />
恭喜您已經解決囉！^____^</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: SAM		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-179</link>

		<dc:creator><![CDATA[SAM]]></dc:creator>
		<pubDate>Thu, 24 May 2012 08:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-179</guid>

					<description><![CDATA[蛙大，感謝你的回覆～
問題已找到了，是我自已在換頁的時候，將ListView.removeAllViewsInLayout()，
但我有將現在ListView畫面紀錄，
position = ListView.getFirstVisiblePosition();
在back回到ListView onRestart時，ListView.setSelection(position);
ListView沒有回到正確的position（看來setSelection沒有動作）
現在把ListView.removeAllViewsInLayout() 移除就不會再跳到ListView的第一筆資料了（問題是解決了，但仍不清楚為何不是每次都發生！？ = =）]]></description>
			<content:encoded><![CDATA[<p>蛙大，感謝你的回覆～<br />
問題已找到了，是我自已在換頁的時候，將ListView.removeAllViewsInLayout()，<br />
但我有將現在ListView畫面紀錄，<br />
position = ListView.getFirstVisiblePosition();<br />
在back回到ListView onRestart時，ListView.setSelection(position);<br />
ListView沒有回到正確的position（看來setSelection沒有動作）<br />
現在把ListView.removeAllViewsInLayout() 移除就不會再跳到ListView的第一筆資料了（問題是解決了，但仍不清楚為何不是每次都發生！？ = =）</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: Hans		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-178</link>

		<dc:creator><![CDATA[Hans]]></dc:creator>
		<pubDate>Tue, 22 May 2012 13:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-178</guid>

					<description><![CDATA[回覆的對象為「&lt;a href=&quot;https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-177&quot;&gt;SAM&lt;/a&gt;」。

Dear SAM:
小蛙看了一下API，以下是removeAllView的描述，
public void removeAllViews ()
    Call this method to remove all child views from the ViewGroup.
layout.removeAllViews() 看起來只會移除layout中的 child views，
如果您的ListView不屬於 layout 的 child view 應該不至於被重置才對，
會不會是有什麼其他問題呢？或是查看DDMS有可能是記憶體GC(純猜測)
祝您好運囉！^__^]]></description>
			<content:encoded><![CDATA[<p>回覆的對象為「<a href="https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-177" data-wpel-link="internal">SAM</a>」。</p>
<p>Dear SAM:<br />
小蛙看了一下API，以下是removeAllView的描述，<br />
public void removeAllViews ()<br />
    Call this method to remove all child views from the ViewGroup.<br />
layout.removeAllViews() 看起來只會移除layout中的 child views，<br />
如果您的ListView不屬於 layout 的 child view 應該不至於被重置才對，<br />
會不會是有什麼其他問題呢？或是查看DDMS有可能是記憶體GC(純猜測)<br />
祝您好運囉！^__^</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: SAM		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-177</link>

		<dc:creator><![CDATA[SAM]]></dc:creator>
		<pubDate>Tue, 22 May 2012 10:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-177</guid>

					<description><![CDATA[蛙大您好，先謝謝你，這個方法的確可以減少廣告不斷開啟thread，而耗盡資源。
但我遇到了一個問題，需向您請教，
我在一個Activity中建立了一個ListView (Adapter: BaseAdapter)，當我按下ListView中的Item時，會跳至下一個Activity，按back key後會回來ListView並停留在之前點選的頁面上。
但我發現有時回復時會回到ListView的第一筆資料，
後來找到的問題是在按下ListView Item進入下一個activity之前，
onPause() &#062; cleanLayout(); &#062; layout.removeAllViews(); 似乎會使 getview 又動作，監看position的位置則為 0 開始，依序完成第一頁的各Item。
不知蛙大是否有碰過類似的問題，或者能提供相關的建議，可以使removeAllViews();後不使getview再次動作。
謝謝
SAM]]></description>
			<content:encoded><![CDATA[<p>蛙大您好，先謝謝你，這個方法的確可以減少廣告不斷開啟thread，而耗盡資源。<br />
但我遇到了一個問題，需向您請教，<br />
我在一個Activity中建立了一個ListView (Adapter: BaseAdapter)，當我按下ListView中的Item時，會跳至下一個Activity，按back key後會回來ListView並停留在之前點選的頁面上。<br />
但我發現有時回復時會回到ListView的第一筆資料，<br />
後來找到的問題是在按下ListView Item進入下一個activity之前，<br />
onPause() &gt; cleanLayout(); &gt; layout.removeAllViews(); 似乎會使 getview 又動作，監看position的位置則為 0 開始，依序完成第一頁的各Item。<br />
不知蛙大是否有碰過類似的問題，或者能提供相關的建議，可以使removeAllViews();後不使getview再次動作。<br />
謝謝<br />
SAM</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: Hans		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-176</link>

		<dc:creator><![CDATA[Hans]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 07:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-176</guid>

					<description><![CDATA[回覆的對象為「&lt;a href=&quot;https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173&quot;&gt;Darren&lt;/a&gt;」。

這個小蛙也有跟他們的技術人員接洽過，
現在他們已經把官網上的版本改成1.3.5，
(這個版本以上的jar就不會有狂閃的問題了！)]]></description>
			<content:encoded><![CDATA[<p>回覆的對象為「<a href="https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173" data-wpel-link="internal">Darren</a>」。</p>
<p>這個小蛙也有跟他們的技術人員接洽過，<br />
現在他們已經把官網上的版本改成1.3.5，<br />
(這個版本以上的jar就不會有狂閃的問題了！)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: Darren		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-175</link>

		<dc:creator><![CDATA[Darren]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 07:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-175</guid>

					<description><![CDATA[回覆的對象為「&lt;a href=&quot;https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173&quot;&gt;Darren&lt;/a&gt;」。

thx~ 加了這行就沒問題了。
KuAd的問題我有跟他們工程師反映過，好像是每次切換activity的時候都會重新reload廣告，不過最後會變得狂換廣告，閃來閃去。後來他們給了我們另一版.jar，就不會有這問題了，但不確定會不會更新到接下來的版本。]]></description>
			<content:encoded><![CDATA[<p>回覆的對象為「<a href="https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173" data-wpel-link="internal">Darren</a>」。</p>
<p>thx~ 加了這行就沒問題了。<br />
KuAd的問題我有跟他們工程師反映過，好像是每次切換activity的時候都會重新reload廣告，不過最後會變得狂換廣告，閃來閃去。後來他們給了我們另一版.jar，就不會有這問題了，但不確定會不會更新到接下來的版本。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: Hans		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-174</link>

		<dc:creator><![CDATA[Hans]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 02:40:37 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-174</guid>

					<description><![CDATA[回覆的對象為「&lt;a href=&quot;https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173&quot;&gt;Darren&lt;/a&gt;」。

小蛙在試這個方法的時候，在Activity的onDestroy中加上
&lt;code&gt;android.os.Process.killProcess(android.os.Process.myPid());&lt;/code&gt;
讓程式結束時把整個process砍掉，剛剛測了一下背景廣告就沒有再撥放了，
(小蛙的AdWhirl refresh time設定為 Disabled，避免與 kuAD 的 refresh time 衝突造成多開)，
如果是需要背景執行的程式可能就要再想其他讓廣告別在背景跑的方法了！
也謝謝您提供用較小的Acitivty去new物件的方法喔!! ^_^]]></description>
			<content:encoded><![CDATA[<p>回覆的對象為「<a href="https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173" data-wpel-link="internal">Darren</a>」。</p>
<p>小蛙在試這個方法的時候，在Activity的onDestroy中加上<br />
<code>android.os.Process.killProcess(android.os.Process.myPid());</code><br />
讓程式結束時把整個process砍掉，剛剛測了一下背景廣告就沒有再撥放了，<br />
(小蛙的AdWhirl refresh time設定為 Disabled，避免與 kuAD 的 refresh time 衝突造成多開)，<br />
如果是需要背景執行的程式可能就要再想其他讓廣告別在背景跑的方法了！<br />
也謝謝您提供用較小的Acitivty去new物件的方法喔!! ^_^</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		留言者: Darren		</title>
		<link>https://noter.tw/1911/%e7%b9%bc%e6%89%bfapplication%e9%81%94%e5%88%b0global-variable/#comment-173</link>

		<dc:creator><![CDATA[Darren]]></dc:creator>
		<pubDate>Mon, 06 Feb 2012 18:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://wazai.net/?p=1911#comment-173</guid>

					<description><![CDATA[解掉了不少leak，感恩！另外發現就算APP關閉了，廣告似乎還是會在背景跑，造成參照的context無法被回收。目前我是用比較小的activity去new這些物件，減少leak的size，希望可以多少有些幫助...]]></description>
			<content:encoded><![CDATA[<p>解掉了不少leak，感恩！另外發現就算APP關閉了，廣告似乎還是會在背景跑，造成參照的context無法被回收。目前我是用比較小的activity去new這些物件，減少leak的size，希望可以多少有些幫助&#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
