Filed under
Android
Recently, I came across a pretty annoying issue with the FragmentPagerAdapter in the Android Compatibility Library (v4, released in October 2011). If you change any data in the child fragments of the ViewPager and call notifyDataSetChanged(), nothing happens. The PagerAdapter relies on data inside the FragmentManager instead of rebuilding fragments through the getItem() call. It seems others have faced this issue as well:
http://code.google.com/p/android/issues/detail?id=19001
Looking through the source code, it looks like there is no default DataSetObserver. Worse is the fact that the DataSetObserver interface is private to the Android Compatibility Library so you can’t even supply your own ! Luckily, a workaround can be found as follows:
Create a new class called PagerAdapterCompat with the package name android.support.v4.view
package android.support.v4.view;
public abstract class FragmentPagerAdapterCompat extends FragmentPagerAdapter {
public FragmentPagerAdapterCompat(FragmentManager fm) { super(fm); }
public interface DataSetObserver extends PagerAdapter.DataSetObserver {}
public static void setDataSetObserver(PagerAdapter adapter, DataSetObserver observer) {
adapter.setDataSetObserver(observer);
}
}
Don’t forget to hit Ctrl+Shift+O in eclipse to get those imports added
After this, you can simply create your own DataSetObserver (I made mine pretty basic by calling destroyItem() on each page) and set it with FragmentPagerAdapterCompat.setDataSetObserver(your_adapter, your_observer);
All credit goes to this guy for reporting the bug and providing a quick and easy solution: http://code.google.com/p/android/issues/detail?id=19110 (although his is more general for the PagerAdapter)
Please head on over there to star the bug so that it get’s more attention!
Filed under
Windows
A few days ago, I picked up a Windows Phone out of curiosity; Microsoft has always been experienced when it came to developer platforms, so I thought it was worth looking into as an option. While WP7′s market is insignificant compared to Android and iOS, it’s clear that Microsoft is serious about this version and have not been holding anything back (spending half a billion dollars doing so).
The other aspect that I was interested in is the fact that Windows Phone 7 development centers around C#, and I’ve been looking for every excuse to try out C#. An improvement to C? Something better than Java? Why not?
So, after signing up to Microsoft’s AppHub, I decided to try my hand at the Mango update. It only took a day to get an invite for the Mango update. And only a few hours to install it onto my phone:

My opinion so far: Awesome
Everything right away is way smoother. There’s a lot of integration with Facebook, Google, and of course Live while there’s still enough options to ensure you can disable one or the other. It’s the kind of integration that’s functional without being annoying.. I’m surprised anyone was able to pull it off better than Android.
Now with that, I still feel there’s quite a bit to go. There’s a couple of annoyances to Windows Phone 7 that just has me holding back. For one.. why do I have to tap the status bar to see my phone’s reception? I mean the number one most important piece of information of a cellphone is your cell reception. Or am I just crazy? There’s a few others.. but I’ll leave it at that.
Tagged Mango, Windows Phone, WP7
Filed under
Android,
KBudget
It’s taking some time, but I’ve finally completed the new UI for KBudget. Since pictures are more powerful than words, here are some for you to enjoy while you’re waiting for your phone to install the update
Get KBudget 0.40 on the market today! And let me know what you think of the new User Interface!
Filed under
Uncategorized
So I just uploaded KBudget 0.30 on the market after having it on my computer for over a month now! Hopefully it’s free of bugs!
Go check it out now to find the charts, new view mode, and some minor UI changes.
Next version will contain more chart options
Filed under
Android,
KBudget
Ok so here’s the deal, I do have another version of KBudget ready, actually it’s been ready for awhile. The hard part is finding the time to do proper testing to make sure there aren’t any bugs (I’m a bit of a perfectionist).
So basically, I could use some users who would be willing to test out some less than perfect versions every once and awhile. If you’re interested, contact me using the contact form (here) or send an email to andrew @ this domain name.
Filed under
Uncategorized
Just fixed a bug with the comments on the news items… now you can properly view the comments on each post.
Sorry about that..
Filed under
Android,
KBudget
So it might not be the biggest milestone to pass, but considering I just wrote this up quickly to solve my own problems, I think it’s quite an accomplishment. Clearly there’s a need for software like KBudget on the marketplace.
What’s next for KBudget? Here’s a few of the things I have planned:
- UI Overhaul (working on some concepts but if any artists out there want to help, I’m sure I could use it)
- add weekly/bi-weekly budgeting support
- add some graphs (this one will be tougher given that the app is free so I’ll have to write this from scratch)
- a super secret feature that I’m sure you’ll all love
If you have an idea you’d like to suggest for KBudget, send me an email or use the contact page on this site.
In other news, KBudget 0.22 will be added to the marketplace soon. This is just a minor update which adds Chinese Locale Support (thanks to goapk.com).
Filed under
Android,
KBudget
An update to KBudget has been posted yesterday on the Android Marketplace. This is a small update that fixes various bug fixes including some annoying date bugs that caused transactions to appear in incorrect months. There is also some fixes to the status bar calculations so that the right column properly calculates based on transactions in the current year.
Hopefully there aren’t any other issues with this release. But let me know in the comments or through the contact page if you run into any problems!
Filed under
Android,
KBudget
Within a day or two, I’ll be pushing another update to KBudget, my Android application which allows you to track your daily spending.
Screen of the password prompt
Screenshot of the new Auto complete box for transaction descriptions. This allows you to quickly enter common transactions
This update brings some new features such as password protection, basic export/import functionality, auto completion box for transactions, and more!
Hopefully there won’t be any unexpected bugs, but let me know if you run into any!
Filed under
Server Admin
So I just spent a couple of hours last night knocking my head wondering why my postfix configuration on my server stopped working. I currently use Google Apps email services (which are free btw) for the email on this server and I have postfix setup to relay any mail the server has through Google Apps.
It’s been running great for the past 2 months but suddenly I noticed it was acting up. I got several errors like this:
May 6 05:53:46 kwasik postfix/smtp[20753]: certificate verification failed for smtp.gmail.com[74.125.113.109]:587:
untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
May 6 05:53:46 kwasik postfix/smtp[20753]: 25CF63C05A: to=, relay=smtp.gmail.com[74.125.113.109]:587, delay=2509, delays=2509/0.16/0.26/0, dsn=4.7.5, status=deferred (Server certificate not trusted)
At first, I thought something went wrong with my SSL certificates, so I tried re-doing those. No luck. Several hours later, I stumbled upon this:
http://www.google.com/support/forum/p/gmail/thread?tid=7e4a679f5917149e&hl=en
Seems Google decided to change their Certificate Authority.. instead of using Thawte, they’re now using Equifax (no wonder Equifax kept popping up in my log).
Anyways the simple fix (run as root):
cat /etc/ssl/certs/Equifax_Secure_CA.pem >> /etc/postfix/cacert.pem
Mind you, the above applies to Debian 5.0, but it should at least help you on your way to fixing the problem.
Tagged Debian, Gmail, Google Apps, Postfix