Keyboard on iOS

The keyboard is present in nearly every application out there. Using the keyboard is the easiest way to provide users with a way to input alphanumeric data into applications. Trivial as it might look like in the beginning, a correct implementation of keyboard behavior can be a costly endeavor. Multiple keyboard states make it hard to implement logic that will behave correctly for all of them. This post will cover my observations and experiences with the keyboard system in iOS. I will try to d [...]

Useful Plugins for Xcode

What’s this all about? This is just a short collection of some useful Xcode 4/5 plugins I use. Most of us Cocoa developers, I guess, are looking about for making our development environment a more friendly and “warm” place with features enriching the development experience. This list is far off being complete and will be extended permanently. So if you like it you should take a look at it from time to time. UncrustifyX Xcode plugin to uncrustify the source code opened in the ed [...]

Android swipe gesture implementation

When developing an Android app, you can use the intuitive Gesture Detector class horizontally, vertically, and diagonally to translate subtle motions into distinct events. One of the coolest things about the modern smartphone is the wide array of input and sensory devices available. In the past, we've covered Android's internal vibrator and the accelerometer. This tutorial is about Android's impressive Gesture Detector class, which you can use to translate subtle motions into distinct events fo [...]

Testing on Android

Unit Tests JUnit Tests There's no reason you can't use normal JUnit 4 testing for Android applications... as long as you stay away from anything Android. Normally you compile against the SDK's android.jar, which contains nothing but stubbed methods that throw exceptions when run. When you actually upload your APK to a device, it uses the device's implementations of all those stubs. As a result, when running normal unit tests in your IDE, you get no access to those framework implementations ( [...]

Load custom marker on GoogleMap V2

To load custom icon as marker of GoogleMap V2, save the icon in drawable folder. Load it using the code protected void addCustomMarker() { BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher); myMap.addMarker(new MarkerOptions() .position(point) .icon(bitmapDescriptor) .title(point.toString())); } [...]