[AC-559] Android: Colors not applied to TextField underline, caret, and active Switch per docs
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-10T08:19:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Shak Hossain |
Created | 2016-01-07T22:19:36.000+0000 |
Updated | 2016-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
File | Date | Size |
---|---|---|
colorAccent.png | 2016-01-07T22:13:34.000+0000 | 11458 |
Screen Shot 2016-01-07 at 11.42.38 AM.png | 2016-01-07T22:13:44.000+0000 | 15596 |
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.