Titanium JIRA Archive
Appcelerator Community (AC)

[AC-559] Android: Colors not applied to TextField underline, caret, and active Switch per docs

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2016-01-10T08:19:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterTim Poulsen
AssigneeShak Hossain
Created2016-01-07T22:19:36.000+0000
Updated2016-01-10T08:19:51.000+0000

Description

According to this doc http://docs.appcelerator.com/platform/latest/#!/guide/Android_Themes-section-34636181_AndroidThemes-MaterialTheme I should be able to set the colorAccent and/or colorControlActivated property to specify the foreground color of various controls, including the switch. I think these are also supposed to set the color of the TextField underline and caret.
    <item name="colorAccent">#ef6123</item>
    <item name="colorControlNormal">#757575</item>
    <item name="colorControlActivated">#ef6123</item>
    <item name="colorControlHighlight">#ef6123</item>
However, as shown in the attached "colorAccent.png" image, these values have no effect. Other colors, such as colorPrimary and colorPrimaryDark to set the ActionBar and StatusBar colors are working (as shown in the Screen Shot graphic). So, I think my theme is correctly configured. I have tried also specifying the color in my styles file with this entry:
  <style name="EditTextacvtheme" parent="android:Widget.EditText">
	  <item name="android:background">@drawable/acvtheme_edit_text_holo_light</item>
	  <item name="android:textColor">#000000</item>
    <item name="android:padding">8dp</item>
    <item name="android:textColorHint">@color/cursor</item>
  </style>
where @color/cursor is set to <color name="cursor">#ffef6123</color> in my colors file. This also has no effect on the caret. I'm not sure if this is a documentation issue or an SDK issue. I have searched the Android docs and StackOverflow and these appear to be the correct names. So, this is probably an SDK issue.

Attachments

FileDateSize
colorAccent.png2016-01-07T22:13:34.000+000011458
Screen Shot 2016-01-07 at 11.42.38 AM.png2016-01-07T22:13:44.000+000015596

Comments

  1. Tim Poulsen 2016-01-08

    Since I can't close this on my own, please close it for me. I was not applying the theme to my app's child windows. They were getting the default template instead.

JSON Source