I impement custom Edittext, как показано ниже. мой цвет hinttext моего приложения не изменится в галактике samsung neo, и все подсказки скрываются с этим текстом редактирования. Я пытаюсь изменить textHintColor в XML, а также пробовал:не может изменить цвет текста edittext
nameEditText.setHintTextColor(getResources().getColor(R.color.primary));
но Nothings изменения только в этом телефоне.
public class EditText extends android.widget.EditText {
public EditText(Context context) {
super(context);
final Typeface tf = Typeface.createFromAsset(context.getAssets(), Constants.APPLICATION_FONT);
setTypeface(tf);
// setTextSize(this.getTextSize());
}
public EditText(Context context, AttributeSet attrs) {
super(context, attrs, android.R.attr.editTextStyle);
final Typeface tf = Typeface.createFromAsset(context.getAssets(), Constants.APPLICATION_FONT);
setTypeface(tf);
// setTextSize(this.getTextSize());
}
public EditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
final Typeface tf = Typeface.createFromAsset(context.getAssets(), Constants.APPLICATION_FONT);
setTypeface(tf);
// setTextSize(this.getTextSize());
}
Я также меняю тему приложения, но не изменения. и это использование EditText:
<com.myproj.widget.EditText
style="@style/Text.SettingItem"
android:id="@+id/emailEditText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="start"
android:hint="@string/hint_email"
android:inputType="textEmailAddress"
android:maxLength="40"
android:singleLine="true" />
http://stackoverflow.com/questions/25134463/edittext-unable-to-change-the-text-color#answer-25134499 – Nabin