Call methods of new Android APIs in SDK version switch
<p>The latest Android APIs have some helpful methods that are not available to older Android versions. The <code>DatePicker</code>, for example, has a new method called <code>setCalendarViewShown()</code> that is not available for old APIs such as Android 2.2 (level 8) and so on.</p>

<p>However, I've set the minimum API level to 8 and the target level to 16. So I would like to use these methods if available (on level 11+ devices).</p>

<p>Now I've tried to distinguish between several API levels programatically and, if available, call the method like this:</p>

<pre><code>if (android.os.Build.VERSION.SDK_INT &gt;= 11) {
    datePicker.setCalendarViewShown(false);
}
</code></pre>

<p>Is this approach okay? In Eclipse, there's just some warnings, but they can be suppressed, of course. Due to checking for the <code>SDK_INT</code>, this code should be fine and cause no problems, shouldn't it?</p>
