I am trying to change the underline color of Android textfields in Titanium Alloy using a custom theme, but for some reason it doesn't pick up my new colors(s).
I have created a theme under project/app/platform/android/res/values/awesome_theme.xml
with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="awesome" parent="@style/Theme.AppCompat">
<item name="colorControlNormal">#ff0000</item>
<item name="colorControlActivated">#00ff00</item>
<item name="colorControlHighlight">#0000ff</item>
</style>
</resources>
And I have changed my tiapp.xml
file to use the new theme:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<application android:theme="@style/awesome"/>
</android>
I have cleaned the project, but the text field is still showing up with the default blue underline when I rebuild the project.
What am I doing wrong here?
You have to use a different background image, go to your XML "awesome_theme.xml" and add the custom
EditText
styleinsted of using image drawble file-->
apptheme_edit_text_holo_light
in thatEditText
style you can use a drawable resource file which has a stroke , go with that one or this stroke one ,then Just do this in your
EditText
:or
you can change Underline of
EditText
color specifying it in awesome_theme.xml. add the following tag under your styleTheme.AppCompat
.Note : android:textColorSecondary is used to determine the color of the back arrow and
DrawerLayout
hamburger icon in theActionBar
, too soo careful