从现在开始,后面会介绍android中的一些常用的控件。。。
今天介绍TextView这个控件,这也是android的HelloWorld中第一个不用自己写代码,就自动生成的。。。
TexitView是向用户展示文字的(也就是用户界面上能看到的文字),以下是开发文档上的原文:
Displays text to the user and optionally allows them to edit it. A TextView is a complete text editor, however the basic class is configured to not allow editing; see EditText for a subclass that configures the text view for editing.
介绍下TextView的属性:
(1)设置字体的一些属性
android:textColor="#fff00f"--------------设置字体的颜色
android:textSize="30sp"---------------设置字体的大小(单位一般应sp)
android:textStyle="bold"---------------设置字体的(粗体,斜体等)