如何更改TEXTSIZE在日期选择器? [英] How to change textsize in datepicker?

查看:197
本文介绍了如何更改TEXTSIZE在日期选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在日期选择器的默认TEXTSIZE太大了,我的应用程序。我见过一个建议的方式来改变它href=\"http://stackoverflow.com/questions/8837480/android-honeycomb-datepicker-text-color\"> ,但周围捕鱼的textviews嵌套在日期选择器类中似乎笨重且容易出错。

The default textsize in datepicker is too big for my app. I've seen a way suggested to change it here, but fishing around for the textviews nested inside the datepicker class seems clunky and error prone.

有没有更好/更清洁的方式做到这一点?

Is there a better/cleaner way to do it?

推荐答案

低于code使用:

ViewGroup childpicker = (ViewGroup)datePicker.findViewById(Resources.getSystem().getIdentifier("month", "id", "android"));

EditText mornthEt = (EditText)childpicker.getChildAt(1);// month widget

//change textsize and textcolor for mornthEt

mornthEt.setTextSize(30);

mornthEt.setTextColor(Color.GREEN);

这篇关于如何更改TEXTSIZE在日期选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆