1

I have an issue on my custom theme definition on theme.xml. I've defined my custom theme and set as follow my custom styles for buttons, textviews and edittexts.

<style name="QTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:fontFamily">@font/bahnschrift</item>
    <item name="android:textColor">@color/foreground_color</item>
    <item name="android:textViewStyle">@style/QTheme.TextView</item>
    <item name="editTextStyle">@style/QTheme.EditText</item>
    <item name="android:editTextStyle">@style/QTheme.EditText</item>
    <item name="buttonStyle">@style/QTheme.Button</item>
    <item name="android:buttonStyle">@style/QTheme.Button</item>
</style>

<!-- white button -->
<style name="QTheme.Button" parent="Widget.AppCompat.Button">
    ... all my item definitions ...
</style>

<style name="QTheme.EditText" parent="Widget.AppCompat.EditText">
    ... all my item definitions ...
</style>

<style name="QTheme.TextView" parent="Widget.AppCompat.TextView">
    ... all my item definitions ...
</style>

By the way, this is not working properly: i set my theme to my activity on Manifest.xml but buttons, textviews and edittexts have not the styles I have defined.

<activity
        android:name=".activities.MyActivity"
        android:theme="@style/QTheme" />

Can someone help me? What am I doing wrong?

FringeDc
  • 85
  • 1
  • 8

1 Answers1

0

use <item name="android:editTextStyle">@style/QTheme.EditText</item>

inside your QTheme style tag