Android的DatePicker的字样 [英] Android DatePicker Typeface

查看:158
本文介绍了Android的DatePicker的字样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,你可以在Android的应用自定义字体到一个TextView是这样的:

I am aware you can apply a custom TypeFace to a TextView in Android like this:

TextView tv = findViewById(R.id.textview01);
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/BLACKROSE.TTF");
tv.setTypeface(tf);

有没有什么办法可以做到这一点的一个datepicker?

Is there any way possible to do this for a DatePicker?

推荐答案

在服用一看来源,日期选择器插件拥有3 NumberPicker部件(为日,月,年)这又抱一个TextView。所以,你会需要设置的字体为的DatePicker内NumberPickers内部的TextView的。

After taking a look at the source, the Datepicker widget holds 3 NumberPicker widgets (for day, month, year)which in turn hold a TextView. So you are going have to set the Typeface for the TextView inside the NumberPickers inside the DatePicker.

我认为你必须获得源为NumberPicker和的DatePicker和修改源来实现这一点,谈何容易我害怕。

I think you'll have to get the source for both NumberPicker and DatePicker and modify the source to achieve this, easier said than done I'm afraid.

这篇关于Android的DatePicker的字样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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