从API 16开始,Jellybean Roboto被引入为可用的字体系列。查看Android 16中的“新功能”此处.
在TextView
上指定android:fontFamily="sans-serif"
(在API 16+中为Roboto),会将TextView
的默认fontFamily
设置为此字体系列吗?
是什么?
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
等同于
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif" />
从 Material design typography website:
"Roboto和Noto是Android和Chrome的标准字体."
从 维基百科,
"Roboto是一种无衬线字体家族,由Google开发,作为其移动操作系统Android的系统字体。"
我在文档中没有看到Android默认的fontFamily
是什么。参见以下引用: