title: build for different targets conditionally
body: <p>I have been building for API 14 so far. I'm trying to get ready now, so I downloaded and specified API 7 as my target. I have some compilation errors because a few api's I was using in API14 aren't available in API7. </p>
  
  <p>I am wondering how I could put them in conditionals. Something on the lines of:</p>
  
  <pre><code>if (API_14)
  {
      if (mTextEdit.isEmpty()) {
          // Do Something
      }
  } else if (API_7){
      if (mTextEdit.matches("")) {
          // Do the same thing
      }
  }
  </code></pre>
  
  <p>This has to be a compile time conditional switch because otherwise my code won't even compile. </p>
  
  <p>I've heard before that pre-processors are not supported in Java, so I welcome suggestions on how best to manage my source which I'm targeting for multiple versions.</p>
  
  <p><strong>Edit:</strong>
  I also am running into trouble with my state list drawable:</p>
  
  <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;item
          android:state_pressed="true"
          android:drawable="@android:color/holo_orange_dark" /&gt;
  
      &lt;item android:drawable="@android:color/transparent" /&gt;
  
  &lt;/selector&gt;
  </code></pre>
  
  <p>Of course, hold_orange_dark isn't available in API7. I'd like to be able to manage those as well.</p>