Android Question Using version-based theme with Appcompat

Ederson Kerber

Member
Licensed User
Good Morning,

I'm using the theme in a version posted at: https://www.b4x.com/android/forum/threads/theme-based-on-version-tutorial.27624/ by @barx in an example provided by @Erel
However, I'm encountering difficulties when I use the version-based theme with an extension: android.support.v7.app.AppCompatActivity.

Here is the error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{barxdroid.VersionThemeDemo/barxdroid.VersionThemeDemo.main}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

P.S: When taking the attribute "Extends: android.support.v7.app.AppCompatActivity" the error does not happen, however, I must use the same in my application.

I need to use android.support.v7.app.AppCompatActivity due to Android version compatibility.

Thanks, I appreciate that you can help.
 

Attachments

  • log.JPG
    log.JPG
    118.9 KB · Views: 449
  • main.JPG
    main.JPG
    54.2 KB · Views: 449
  • manifest.JPG
    manifest.JPG
    51.7 KB · Views: 438
Top