changing Android picker font color on titanium appcelerator

北慕城南 提交于 2019-12-02 17:30:24

问题


I am using a picker on my application of type time picker. The picker works fine on iOS devices, however when I go to the android application, it appears, but the font color is white, and cant see the numbers.
I do not want to change the background to a darker color because it doesnt match the rest of the application and wont be matching the ios app. I was wondering if there is a way to change just the font to black or gray color. I have already tried some of the solutions posted, and changing the themes, but it has not worked out for me.


回答1:


You need to create custom theme

<resources>
    <style name="Theme.NoActionBar" parent="@style/Theme.AppCompat.Light"> </style>
</resources>

Put this code in /platform/android/res/values/custom_theme.xml




回答2:


To fix the solution to this, you can add the following in your Theme.xml file under platform/android/values.

You can visit this link for my post on the appcelerator developer forum where I had raised this issue.

http://developer.appcelerator.com/question/182115/picker-font-color-on-android

Now you can apply the theme attribute to the window that you are planning on using your picker in, and applying the Light or LightDarkBar theme. This will turn the color your picker font to black.

You can format the code in the editor after pasting it. You can do that by pressing command shift F on mac, and for windows I am sure its control shift F, but not 100% on that.



来源:https://stackoverflow.com/questions/29832782/changing-android-picker-font-color-on-titanium-appcelerator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!