Month: August 2012

Android ListView With Rounded Corners

To make a ListView with rounded corners make a new xml file which will handle the rounded corners. “roundedlistview.xml” <?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=””      android:shape=”rectangle”>      <gradient android:startColor=”#ffffff” android:endColor=”#000000″             android:angle=”270″/>  

Tagged with: , ,

Angry Birds Green Day Second Page Golden Grenade

To get to the second page you need to find the golden grenade. Though it could have been a strawberry, heartshape or something else, but it’s a grenade. The golden grenade is in the 3. level in the bottom left corner.

Tagged with: , ,

Android ViewPager Compatibility Package

Android got a compatibility package you need to add to use the ViewPager. Make sure it’s the v4 or newer. Take a look at the Support Library Further look: Adding a library/JAR to an Eclipse Android project

Tagged with: , ,

Android Get Focused View From ViewPager

To get the focused view in a Android ViewPager call the OnPageSelected(). private int focused = 0; private class MyPageChangeListener extends ViewPager.SimpleOnPageChangeListener {     @Override     public void onPageSelected(int position) {         focused = position;

Tagged with: , ,

Andorid Programmatic Shapes With Gradient

You can fairly easy make rounded rectangles in Android by using the GradientDrawable class GradientDrawable gd = new GradientDrawable(); gd.setColor(Color.RED); gd.setCornerRadius(10); gd.setStroke(2, Color.WHITE); Take a further look at this blogpost for more examples.  

Tagged with: , ,

Windows 8 Activation 0x8007232B DNS Name Does Not xist

When installing Windows 8 you might run into not being able to activate your product key. If you haven’t typed in your key during the installation and trying to activate it in Control -> System and Security -> System -> Windows

Tagged with: , , ,

Upgrade Windows 8 Release Preview To RTM

No. It is not possible to upgrade from Windows 8 Release Preview to RTM. The error message is: Compatibility report (saved to your desktop) You can’t upgrade this prelease version of Windows. Go to to see how to install Windows

Tagged with: , ,

Xcode Get The iPhones Language

To get the locale language in your app on iPhone you can use the this example: NSLog(@”localeIdentifier: %@”, [[NSLocale currentLocale] localeIdentifier]); If you running english language on your iPhone you’ll get this output: localeIdentifier: en_GB Other output could be en_US

Tagged with: , ,

Xcode Printing NSData to NSLog

In Xcode Object-C to print out NSData to NSLog you might run into rubbish output by just outputting the NSData NSLog(@”%@”, myData); And as output something like this: <3c3f786d 6c207665 7273696f etc… This is not rubbish, though it might look

Tagged with: , ,

Android Change UI From An AsyncTask

To change the UI from a Asynctask in Android Java the easiest way is to pass a Context into the constructor of the AsyncTask. public class myTask extends AsyncTask<URL, Integer, Long> { Context mContext; myTask(Context context) { this.mContext = context;

Tagged with: , ,