On my settings screen I have a date picker widget. In the designer in Eclipse, it shows as I want (3 spinners for D-M-Y) but when I test on my device, I get a rather odd vie
In those cases I use
import android.os.Build;
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void someThing() {
[...]
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
minDateSelector.setCalendarViewShown(false);
}
}
I think the readability is better than using reflection and the style is better than catch and ignore exceptions. Of course the reflection thing is also working.