Monthly Archives: 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=”http://schemas.android.com/apk/res/android”      android:shape=”rectangle”>      <gradient android:startColor=”#ffffff” android:endColor=”#000000″             android:angle=”270″/>  

Posted in Android, Tips and Tricks 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.

Posted in Tips and Tricks, Windows Tagged with: , ,

Android ViewPager Compatibility Package

Android got a compatibility package you need to add to use the ViewPager. android.support.v4.view.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

Posted in Android, Tips and Tricks 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;

Posted in Android, Tips and Tricks 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.  

Posted in Android, Tips and Tricks 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

Posted in ErrorFix, 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 http://go.microsoft.com/fwlink/?LinkID=142337 to see how to install Windows

Posted in ErrorFix, 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

Posted in Mac, Tips and Tricks 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

Posted in ErrorFix, Mac, Tips and Tricks 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;

Posted in Android, Tips and Tricks Tagged with: , ,