title: Is it OK to have so many deprecated methods in backward-compatible code?
body: <p>I'm writing an Android application which is targeted to API level 15 but I also want to keep backward-compatibilty with older API levels (min-sdk 7).</p>
  
  <p>I'm going to reach this by putting conditions deciding which code to use according to current API level (as shown below). I suppose this is a good approach, I just want to ask if it's OK to have so many deprecated methods (like <code>display.getWidth()</code>), because there is quite many changes between API level 8 and 15.
  And if so, if it's a good use of <code>@SuppressWarning("deprecation")</code> in this case?</p>
  
  <p>Wouldn't it be better to use multiple APKs for example for API levels &lt;= 8 and >= 9? (Even though it's not recommended by <a href="http://developer.android.com/guide/market/publishing/multiple-apks.html" rel="nofollow">developer.android.com</a>. </p>
  
  <pre><code>    Display display = ((WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
      Point screenSize = new Point();
  
      // calculate the width
      float width;
      if(Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB_MR2) {
        display.getSize(screenSize);
        width = screenSize.x;
      } else {
        width = display.getWidth();
      }
  </code></pre>
  
  <p>Thanks!</p>