2014-01-25 36 views

回答

8

您可以创建自己的theme其风格colorHint

<style name="AppTheme" parent="Theme.AppCompat" 
    <item name="android:textColorHint">@color/text_color_hint</item> 
</style> 
+0

这个地方我用这种风格布局内工作正常,但似乎并没有为子元素 – Arnab

+0

也许这HTTP工作:/ /stackoverflow.com/questions/8395168/android-get-children-inside-a-view可以帮助你吗? – Rick

+0

感谢您的链接..是的cource我可以找到所有的子元素和setHintTextColor,但我想知道是否有任何方法我可以添加setHintTextColor属性在一个地方(大概在父级布局)而不是经历昂贵而杂乱的迭代...... – Arnab