android - using design library requires using theme.appcompat -
after trying possibilites online came here help
i trying textinputlayout(android.support.design.widget.textinputlayout) floating edittext got error message
<android.support.design.widget.textinputlayout android:layout_width="match_parent" android:layout_height="wrap_content"> <edittext android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="1" /> </android.support.design.widget.textinputlayout>
<resources> <style name="apptheme" parent="theme.appcompat.light.darkactionbar"> <!-- customize theme here. --> <item name="colorprimary">@color/colorprimary</item> <item name="colorprimarydark">@color/colorprimarydark</item> <item name="coloraccent">@color/coloraccent</item> </style>
make sure themes extends theme.appcompact
in styles.xml
<style name="basetheme" parent="theme.appcompat.light.darkactionbar"> <item name="colorprimary">@color/colorprimary</item> <item name="colorprimarydark">@color/colorprimarydark</item> <item name="coloraccent">@color/coloraccent</item> ... </style>
Comments
Post a Comment