Amazon Gift Cards

Friday, December 28, 2012

Card Camera App

Releasing our newest android app with this app you could create cards (currently magic cards) and share to your friends.

Friday, October 19, 2012

Giving away free nexus 7

Over at we are giving away a free Nexus 7 :) or an Ipod Touch if like IOS. We need to reach 10000 votes for us to get the item shipped.
Go vote and share this link Free Nexus 7/IPod Touch
Thanks everyone

Tuesday, October 16, 2012

Introducing uPick.In

As you may have figured out i havent post in a while, have been so busy with work and into a new venture after work.
Here is the part i introduce uPick.In while its not Android related (it will in the future :]) It would be what i would be busy with in the following months. uPick.In is our vision of what a poll/voting site should be in our day and age where we include sentence based poll (create a poll in sentence style) and a gallery poll (poll with external links) and more to come in the future :]

Here is an example of how to create a poll

If you have any suggestions or any comments with it, just drop it over at the comment page here or create a poll in
Thanks everyone

Tuesday, June 26, 2012

Google IO 2012

Within 2 days, Google IO would be live. Here is widget that would stream the developer conference.

Monday, June 25, 2012

Center Tab Item in TabWidget and HorizontalScrollView in Android

So you have a TabWidget within HorizontalScrollView, and you want to center the selectedTab (either dynamically or if you have ViewPager on page scroll). On your TabHost, you'll have something like this.



On your activity/fragment
public void centerTabItem(int position) {
    final TabWidget tabWidget = tabHost.getTabWidget();
    final int screenWidth = getWindowManager().getDefaultDisplay().getWidth();
    final int leftX = tabWidget.getChildAt(position).getLeft();
    int newX = 0;

    newX = leftX + (tabWidget.getChildAt(position).getWidth() / 2) - (screenWidth / 2);
    if (newX < 0) {
        newX = 0;
    horizontalScrollView.scrollTo(newX, 0);

Say you have a viewPager, then you could use it like
public void onPageSelected(int position) {
final int screenWidth = getWindowManager().getDefaultDisplay().getWidth();
Get the phone's width, we need to to know where the center is (by dividing it by half)

final int leftX = tabWidget.getChildAt(position).getLeft();
Get the x position of the item we want to center, this is relative to its parent (horizontalScrollView)

newX = leftX + (tabWidget.getChildAt(position).getWidth() / 2) - (screenWidth / 2);
The center would be calculated based on horizontalScrollView.scrollTo, so the left x plus half the item width, would be negative value as the new x would scroll to the left of the parent, then if you minus (or plus since its going to the left plane/negative) to the half width value of the device then you will arrive in the center.

horizontalScrollView.scrollTo(newX, 0);
Scroll the tabWidget to the newX, y stays at 0
Hope this helps :)

Tuesday, January 17, 2012

Welcome 2012

Belated happy new year, advance happy chinese new year. Last year, i was so preoccupied with a lot of stuff that i only blogged 6 times and only 1 of which is an android tutorial, this year it would definitely be more than 1 lol. And there are lots of great tutorial out there already and sites like Stackoverlow is great place to ask questions. Towards the end of the year last year, i created Generate Android Code to do some code generator, you guys check it out once in awhile.
To start this year, i cleaned up this blog's links and image links that linked to the wordpress version of this site :)