<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Bernie's Blog - Latest Comments</title><link>http://eberniesblog.disqus.com/</link><description></description><atom:link href="https://eberniesblog.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sat, 01 Aug 2015 22:32:57 -0000</lastBuildDate><item><title>Re: Validation with Android Saripaar</title><link>http://www.bernie-eng.com/blog/2015/03/25/validation-with-android-saripaar/#comment-2169865484</link><description>&lt;p&gt;You're welcome :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ragunath Jawahar</dc:creator><pubDate>Sat, 01 Aug 2015 22:32:57 -0000</pubDate></item><item><title>Re: Validation with Android Saripaar</title><link>http://www.bernie-eng.com/blog/2015/03/25/validation-with-android-saripaar/#comment-2169858100</link><description>&lt;p&gt;wow! tks for replying but figured that out.   :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">PRiya Bharath</dc:creator><pubDate>Sat, 01 Aug 2015 22:23:54 -0000</pubDate></item><item><title>Re: Validation with Android Saripaar</title><link>http://www.bernie-eng.com/blog/2015/03/25/validation-with-android-saripaar/#comment-2169839310</link><description>&lt;p&gt;If you are using Gradle, use this one liner in your dependencies block,&lt;/p&gt;&lt;p&gt;compile 'com.mobsandgeeks:android-saripaar:2.0.0'&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ragunath Jawahar</dc:creator><pubDate>Sat, 01 Aug 2015 22:01:57 -0000</pubDate></item><item><title>Re: Validation with Android Saripaar</title><link>http://www.bernie-eng.com/blog/2015/03/25/validation-with-android-saripaar/#comment-1947229812</link><description>&lt;p&gt;Hi, how do you go about actually adding this library in Android Studio?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">PRiya Bharath</dc:creator><pubDate>Sun, 05 Apr 2015 08:03:19 -0000</pubDate></item><item><title>Re: A crazy property market</title><link>http://www.bernie-eng.com/blog/2011/03/28/a-crazy-property-market/#comment-1167201481</link><description>&lt;p&gt;That's me in the photo...light green shirt guy... ya I still remember it was crazy queuing for hours and went in picked the unit within 1 min. Luckily managed to get the right unit although I would prefer klcc view unit.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick </dc:creator><pubDate>Tue, 17 Dec 2013 03:30:27 -0000</pubDate></item><item><title>Re: Android Kiosk Application</title><link>http://www.bernie-eng.com/blog/2013/04/26/android-kiosk-application/#comment-1150042915</link><description>&lt;p&gt;Hi,&lt;br&gt;Thanks for this. Could you please tell me what I need to do in order to show the System UI Bar again.. I haven't tried to hide it yet, but Id'like to know how I can switch back&lt;br&gt;thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikos</dc:creator><pubDate>Wed, 04 Dec 2013 05:26:21 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-994070287</link><description>&lt;p&gt;Use a GUI-less fragment with setRetainInstance(true) to store any data to big to go into Bundles during configuration changes.&lt;/p&gt;&lt;p&gt;More about it here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.vogella.com/articles/AndroidFragments/article.html#fragmentspersistence_configurationrestarts" rel="nofollow noopener" target="_blank" title="http://www.vogella.com/articles/AndroidFragments/article.html#fragmentspersistence_configurationrestarts"&gt;http://www.vogella.com/arti...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kashban</dc:creator><pubDate>Fri, 09 Aug 2013 02:14:02 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-994069308</link><description>&lt;p&gt;You mistake setRetainInstance(true) with configChanges=orientation in the manifest.&lt;/p&gt;&lt;p&gt;With setRetainInstance(true) the fragment is detached from the activity when it's destroyed during configuration changes and reattached as soon as the activity has been recreated. Other than with configChanges=orientation the GUI actually IS recreated using the resource identifiers. Since I do not hold any references to Context-based entities, there is no risk of leaking the old context.&lt;/p&gt;&lt;p&gt;But, and that is the main point to get a fluid and performant orientation change, the data cached in the fragment instance is still there and that's where all the stuff goes which is too expensive to recreate or reload. All I do is to store the bitmaps of the thumbnails in an array in the fragment and when rebuilding the GUI after the orientation change grab those instead of reload them from disk and do all the bitmap operations again (sizing, rotating). This is the memory caching you mentioned.&lt;/p&gt;&lt;p&gt;Yes, I could use a seperate worker fragment to cache data between orientation changes and I probably will in future versions of my app, but so far everything works smoothly even with retaining the instance of a fragment with GUi. I'm using ViewPager to switch fragments, not backstack.&lt;/p&gt;&lt;p&gt;As you say setRetainInstance does not work with fragments on the backstack so here a worker fragment is required.&lt;/p&gt;&lt;p&gt;For a complete explanation and tutorial see&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.vogella.com/articles/AndroidFragments/article.html#fragmentspersistence_configurationrestarts" rel="nofollow noopener" target="_blank" title="http://www.vogella.com/articles/AndroidFragments/article.html#fragmentspersistence_configurationrestarts"&gt;http://www.vogella.com/arti...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kashban</dc:creator><pubDate>Fri, 09 Aug 2013 02:11:33 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-993936872</link><description>&lt;p&gt;Also setRetainInstance() doesn't work on Fragments in the back stack&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh Brown</dc:creator><pubDate>Thu, 08 Aug 2013 23:49:45 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-993934464</link><description>&lt;p&gt;You WANT the GUI to be recreated on orientation change. Otherwise changes due to resource qualifiers and other things can be missed. You also risk leaking the old Context (Views hold references to the Context that created them). This sounds to me like you need to be memory-caching your thumbnails, but that's a totally separate issue. Another possible approach is creating another Fragment whose only job is to hold your cached images. This way your Views still get recreated appropriately and your non-UI fragment can retain its instance.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh Brown</dc:creator><pubDate>Thu, 08 Aug 2013 23:45:14 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-992575733</link><description>&lt;p&gt;See my answer to Josh.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kashban</dc:creator><pubDate>Thu, 08 Aug 2013 02:37:50 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-992575317</link><description>&lt;p&gt;setRetainInstance(true) is the only way I found to make orientation changes in my ViewPager performant. In my App I initially load some thumbnails from pictures on SD card lazily, so GUI takes some time to complete. I then cache the bitmaps of those thumbnails in an array in the fragment, because reloading them takes some time.&lt;/p&gt;&lt;p&gt;With setRetainInstance(false) and only relying to the ViewPager on every orientation change the GUI is completely recreated, loading thumbnails included.&lt;/p&gt;&lt;p&gt;With setRetainInstance(true) the ViewPager grabs hold of the "old" fragment instance and the orientation change is smooth and fast.&lt;/p&gt;&lt;p&gt;So far I didn't came across any issues by using a fragment with setRetainInstance(true) in the ViewPager.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kashban</dc:creator><pubDate>Thu, 08 Aug 2013 02:36:46 -0000</pubDate></item><item><title>Re: Private: Install CyanogenMod 10.1 on the Nexus Q</title><link>http://www.bernie-eng.com/blog/2013/01/20/install-cyanogenmod-10-1-on-the-nexus-q/#comment-958941593</link><description>&lt;p&gt;I had the same experience: no image in recovery mode on monitor, worked fine on TV.&lt;br&gt;Dell monitor, Sony TV.&lt;br&gt;I did adb shell while in recovery mode and saw some messages about display not being HDCP compliant. That may explain why monitors don't work.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mihai</dc:creator><pubDate>Thu, 11 Jul 2013 14:31:20 -0000</pubDate></item><item><title>Re: Java Development Kit v7 on MacOS X 10.8.3</title><link>http://www.bernie-eng.com/blog/2013/04/18/java-development-kit-v7-on-macos-x-10-8-3/#comment-902185845</link><description>&lt;p&gt;Thanks for the write up. I follow this exactly and saw the "you need java SE6.." and then I did the link but when I run eclipse is see: "Alert: Failed to create the Java Virtual Machine."&lt;/p&gt;&lt;p&gt;Any chance you could point me in the right direction? I am actually not even sure how to go back to Oracle or Apple version of java 6 if needed.. so I have myself in a hole&lt;/p&gt;&lt;p&gt;Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ashton</dc:creator><pubDate>Sun, 19 May 2013 13:34:23 -0000</pubDate></item><item><title>Re: Java Development Kit v7 on MacOS X 10.8.3</title><link>http://www.bernie-eng.com/blog/2013/04/18/java-development-kit-v7-on-macos-x-10-8-3/#comment-874816095</link><description></description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guest</dc:creator><pubDate>Wed, 24 Apr 2013 21:02:30 -0000</pubDate></item><item><title>Re: Java Development Kit v7 on MacOS X 10.8.3</title><link>http://www.bernie-eng.com/blog/2013/04/18/java-development-kit-v7-on-macos-x-10-8-3/#comment-874815999</link><description>&lt;p&gt;Test &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guest</dc:creator><pubDate>Wed, 24 Apr 2013 21:02:20 -0000</pubDate></item><item><title>Re: Setting Up OpenVPN on an EC2 Instance</title><link>http://www.bernie-eng.com/blog/2012/08/15/setting-up-openvpn-on-an-ec2-instance/#comment-873127900</link><description>&lt;p&gt;nice one. Thanks.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darragh O'Reilly</dc:creator><pubDate>Tue, 23 Apr 2013 06:59:33 -0000</pubDate></item><item><title>Re: Cheap data plans for existing DiGi users</title><link>http://www.bernie-eng.com/blog/2013/02/17/cheap-data-plans-for-existing-digi-users/#comment-802750044</link><description>&lt;p&gt;How did you get the free SIM? And why not DiGi? I take it you're not happy with the service? :) &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bernie Eng</dc:creator><pubDate>Mon, 18 Feb 2013 01:24:29 -0000</pubDate></item><item><title>Re: Cheap data plans for existing DiGi users</title><link>http://www.bernie-eng.com/blog/2013/02/17/cheap-data-plans-for-existing-digi-users/#comment-801899366</link><description>&lt;p&gt;I got a free SIM and one month use free. RM19 for 1 Gb. Not likely to take the bait. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Palmdoc</dc:creator><pubDate>Sat, 16 Feb 2013 17:39:57 -0000</pubDate></item><item><title>Re: Private: Install CyanogenMod 10.1 on the Nexus Q</title><link>http://www.bernie-eng.com/blog/2013/01/20/install-cyanogenmod-10-1-on-the-nexus-q/#comment-775494914</link><description>&lt;p&gt; Nice :)&lt;/p&gt;&lt;p&gt;I would've thought connecting to monitor would've fared better vs a TV.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ebernie</dc:creator><pubDate>Wed, 23 Jan 2013 05:09:10 -0000</pubDate></item><item><title>Re: Private: Install CyanogenMod 10.1 on the Nexus Q</title><link>http://www.bernie-eng.com/blog/2013/01/20/install-cyanogenmod-10-1-on-the-nexus-q/#comment-775493588</link><description>&lt;p&gt;Hmm, strange. I disconnected from my PC monitor and hooked it up to my TV and display worked fine.&lt;/p&gt;&lt;p&gt;TV is a Sharp Aquos 37" (LC-37GP1U)&lt;br&gt;Monitor is a Gateway LP2417 24"&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Declan Shanaghy</dc:creator><pubDate>Wed, 23 Jan 2013 05:05:07 -0000</pubDate></item><item><title>Re: Private: Install CyanogenMod 10.1 on the Nexus Q</title><link>http://www.bernie-eng.com/blog/2013/01/20/install-cyanogenmod-10-1-on-the-nexus-q/#comment-775487125</link><description>&lt;p&gt;Have you tried booting into CWM from bootloader?&lt;/p&gt;&lt;p&gt;If you've got the Q booted up, boot into booloader (adb reboot bootloader), and your Q should be glowing red. Verify you're in bootloader (fastboot devices should show your device connected) and then finally (fastboot boot [your downloaded recovery]).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ebernie</dc:creator><pubDate>Wed, 23 Jan 2013 04:46:06 -0000</pubDate></item><item><title>Re: Private: Install CyanogenMod 10.1 on the Nexus Q</title><link>http://www.bernie-eng.com/blog/2013/01/20/install-cyanogenmod-10-1-on-the-nexus-q/#comment-775485229</link><description>&lt;p&gt;I have the same problem. No display in recovery mode. I have CM 10.1 pushed to /sdcard, how can I install it without using the display?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Declan Shanaghy</dc:creator><pubDate>Wed, 23 Jan 2013 04:40:15 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-775262666</link><description>&lt;p&gt;Hi Josh,&lt;/p&gt;&lt;p&gt;- setRetainInstance(boolean) is no longer called.&lt;br&gt;- the problem I faced was the inability of the adapter to retrieve its previous Fragments. Any idea how one can go about retrieving existing fragments in an Adapter's getItem() method?&lt;br&gt;- onSaveInstanceState(Bundle): what about objects that can't fit into bundles?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bernie Eng</dc:creator><pubDate>Tue, 22 Jan 2013 19:14:14 -0000</pubDate></item><item><title>Re: Private: Retaining Fragments in ViewPagers</title><link>http://www.bernie-eng.com/blog/2013/01/23/retaining-fragments-in-viewpagers/#comment-775101860</link><description>&lt;p&gt;This is a VERY dangerous approach!. setRetainInstance(true) should only be called on Fragments that don't have a UI. Fragments already have a mechanism for persisting their state: onSaveInstanceState(). Then in your onCreate() and/or your onCreateView() you read the values from the bundle passed in (it will be null on the first run). FragmentManager ensures everything gets linked back up properly, even if you're using ViewPagers. All you should have to do is set the adapter.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh Brown</dc:creator><pubDate>Tue, 22 Jan 2013 15:14:36 -0000</pubDate></item></channel></rss>