title: AppCompat theme for Leanback
body: <p>I opened my old Android TV app project and tried to update the dependencies. I then updated the appcompat libraries to 27.1.1. I opened the leanback fragments and Android Studio warned me the <code>BrowseFragment</code> is deprecated and I should use <code>BaseSupportFragment</code> instead. Same case for other leanback fragments. I then changed all the fragment to AppCompat version (except for <code>LeanbackSettingsFragment</code> as there was no AppCompat version provided) and then changed my Activities extend <code>AppCompatActivity</code>.</p>
  
  <p>After I made these changes, I built the app but when I launched the app I saw this error in logcat:</p>
  
  <blockquote>
    <p>Unable to start activity ComponentInfo{net.swiftzer.trainboard.dev/net.swiftzer.trainboard.main.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.</p>
  </blockquote>
  
  <p>The theme I used for the app and activities are all under <code>Theme.Leanback</code>. But I checked the theme is based on platform native theme.</p>
  
  <p>Should I stick with the deprecated leanback fragment classes or the leanback library do provides AppCompat themes? The leanback library is like a half-baked one. I saw the leanback library do provides an AppCompat version of fragments last year but no sample projects was using them. Now they marked the fragment classes extended from <code>android.app.Fragment</code> as deprecated but they didn't provide proper way to migrate.</p>