I need a help about to find a theme who fits in this part of my project, but first I believe is nice to explain first the structure of the activities to find the answer:
- The main activity (left) don't have any Action Bar, because takes to much space from screen an the Action Bar, polluted the design and is useless in this point.
- The main activity, depending on the option of user, can go to 2 others activities, but both of them are kind of the same of the right activity(not eeeequal equal... is just to explain.) that consists in a Action Bar on top with the text of the result, a button back, one fixed part with some informations, and a Tab Layout with 3 tabs, each one, is a fragment.
the problem starts obviously, in this second activity...
I followed this site to build the screen at first: https://www.androidhive.info/2015/09/android-material-design-working-with-tabs/
but, with this site, they use this style:
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
But using this style, with what i need, the result is this error:
android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.support.design.widget.TabLayout
So, to try to find the answer, i find this site over here: http://geeksmember.blogspot.com.br/2015/10/errorerror-inflating-class.html
Who shows me this solution on styles file:
<style name="AppTheme.Base" parent="android:Theme.Material">
Is a nice solution, is nice because in this moment i can separe the main style from the other style. Ok... buuuuut... when i start the aplication, comes this error:
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
so... that's my question... because, when i use the "Theme.AppCompat.Light.DarkActionBar" comes the first error again... and i stay on this situation who i can't find a style who doesn't match with my needs...
If anyone needs the style file... (this is the style file for all the activities except the main activity)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="AppTheme.Base" />
<style name="AppTheme.Base" parent="***I Need a theme here, i know, this is my question*** :)">
<item name="android:colorPrimary">#212121</item>
<item name="android:colorPrimaryDark">#000000</item>
<item name="android:colorAccent">#303030</item>
</style>
<style name="MyCustomTabLayout" parent="Widget.Design.TabLayout">
<item name="tabIndicatorColor">#80CBC4</item>
</style>
</resources>