Alok
Alok

Reputation: 473

Appcompat Theme not applied on all Widgets

I have extended the Material Theme and applied it in my activity.

In style.xml

  <style name="AppTheme" parent="Theme.AppCompat.NoActionBar"> 
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorAccent">@color/accent</item>
        <item name="android:windowBackground">@color/bg</item>
    </style>`

and in manifest

    <application
        android:allowBackup="true"
        android:theme="@style/AppTheme"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name" >
...</application>

I see Material design styling on Toolbar, Buttons but it is not applied on ImageButton, ToggleButton and Seekbar in Pre Lollipop devices. They show up in Holo Theme.

In my gradle file I am using :

compile 'com.android.support:appcompat-v7:22.1.1'

What should I do to apply a uniform style to all widgets??

Upvotes: 1

Views: 763

Answers (1)

Ga&#235;tan
Ga&#235;tan

Reputation: 12552

According to this blog post, the following widgets are currently supported:

  • AppCompatAutoCompleteTextView
  • AppCompatButton
  • AppCompatCheckBox
  • AppCompatCheckedTextView
  • AppCompatEditText
  • AppCompatMultiAutoCompleteTextView
  • AppCompatRadioButton
  • AppCompatRatingBar
  • AppCompatSpinner
  • AppCompatTextView

For the ToggleButton, you can try to use SwitchCompat instead.

Upvotes: 5

Related Questions