In an appcompat-v7:22.2.0 I used an EditText. An I'musing following theme for an Activity
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/myPrimaryColor</item>
<item name="colorPrimaryDark">@color/myPrimaryDarkColor</item>
<item name="colorAccent">@color/myAccentColor</item>
<item name="android:windowBackground">@color/myWindowBackground</item>
<item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
<item name="colorControlHighlight">#0000AA</item>
</style>
But the color of an EditText is coming in white color. Bottom line, hint and text all are in white. I heard there is a bug in AppCompat But how to resolve this?
EDIT Adding more information
XML file :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/marintopforelements"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp"
android:paddingTop="@dimen/templatePaddingTop">
<android.support.v7.widget.AppCompatEditText
android:id="@+id/emailresponse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|center"
android:layout_marginLeft="@dimen/examtextdiff"
android:imeOptions="actionNext"
android:inputType="textEmailAddress"
android:minLines="2"
android:paddingRight="5dp"
android:textSize="@dimen/inboxTabTextSize"/>
</LinearLayout>
colors.xml
<color name="myPrimaryColor">#3F51B5</color>
<color name="myPrimaryDarkColor">#FF304081</color>
<color name="myAccentColor">#3F51B5</color>
So previously when I was using AppCompat-V7:21 It was coming like below image
But after upgrading to AppCompat-V7:22.2.0 Its like below image
So if it focused its coming like below image
Only that cursor line is in given accent color. But the hint and text are always in white! And this is happening even in both EditText and AppCompatEditText Hope this helps
Aucun commentaire:
Enregistrer un commentaire