I declare style res / values / styles.xml
<style name="EditTextTheme" > <item name="android:textCursorDrawable">@null</item> <item name="android:textColor">@color/yellow</item> <item name="android:textColorHint">@color/greyBack</item> <item name="android:background">@color/green</item> <item name="android:textSize">18sp</item> </style>
I specify this style in EditText:
<com.group.improve.improvegrouptestproject.ImpGroupEditText android:hint="@string/si_username_edit_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLength="20" android:theme="@style/EditTextTheme" android:id="@+id/si_et_username" android:layout_marginTop="@dimen/top_margin" android:layout_marginRight="@dimen/rigth_margin" android:layout_marginLeft="@dimen/left_margin" />
This code works on new versions of Android, on older (for example 4.2.2 Moto X) styles do not work. How to make it work on older versions?