android基本控件学习-----TextView
一、TextView的讲解
《实例一》
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:background="#ccffee"
android:padding="3sp"
android:text="TextView的基本使用"
android:textColor="#cd0000"
android:textStyle="bold"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginLeft="10dp"
android:shadowColor="#F9F900"
android:shadowDx="30.0"
android:shadowDy="30.0"
android:shadowRadius="3.0"
android:text="带阴影的TextView"
android:textColor="#4A4AFF"
android:textSize="30sp"
android:textStyle="bold"
/>
<TextView
android:id="@+id/text3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
android:layout_marginLeft="10dp"
android:layout_marginTop="30dp"
android:background="@drawable/txt_rectborder"
android:padding="3sp"
android:text="带有边框的TextView"
android:textColor="#cd0000"
android:textStyle="bold"
/>
<TextView
android:id="@+id/text4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
android:layout_marginLeft="10dp"
android:layout_marginTop="30dp"
android:background="@drawable/txt_radiuborder"
android:padding="3sp"
android:text="带有圆角边框的TextView"
android:textColor="#cd0000"
android:textStyle="bold"
/>
</LinearLayout>
《属性讲解》
基本使用
id:为TextView设置一个组件id,根据id,我们可以在Java代码中通过findViewById()的方法获取到该对象,然后进行相关属性的设置,又或者使用RelativeLayout时,参考组件用的也是id!
layout_width:组件的宽度,一般写:**wrap_content**或 者**match_parent(fill_parent)**,前者是控件显示的内容多大,控件就多大,而后者会填满该控件所在的父容器;当然也可以设 置成特定的大小,比如我这里为了显示效果,设置成了200dp。
layout_height:组件的宽度,内容同上。
gravity:设置控件中内容的对齐方向,TextView中是文字,ImageView中是图片等等。
text:设置显示的文本内容,一般我们是把字符串写到string.xml文件中,然后通过@String/xxx取得对应的字符串内容的,这里为了方便我直接就写到""里,不建议这样写!!!
textColor:设置字体颜色,同上,通过colors.xml资源来引用,别直接这样写!
textStyle:设置字体风格,三个可选值:**normal**(无效果),**bold**(加粗),**italic**(斜体)
textSize:字体大小,单位一般是用sp!
background:控件的背景颜色,可以理解为填充整个控件的颜色,可以是图片哦!
带有阴影的TextView
android:shadowColor:设置阴影颜色,需要与shadowRadius一起使用哦!
android:shadowRadius:设置阴影的模糊程度,设为0.1就变成字体颜色了,建议使用3.0
android:shadowDx:设置阴影在水平方向的偏移,就是水平方向阴影开始的横坐标位置
android:shadowDy:设置阴影在竖直方向的偏移,就是竖直方向阴影开始的纵坐标位置
带有边框的TextView
(1)没有圆角:在drawable目录下面定义shape类型的xml文件,在TextView的background属性中使用
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!--设置一个黑色宽度为5px的一个边框-->
<stroke android:color="#000000" android:width="5px"/>
<!--渐变-->
<gradient
android:angle="270"
android:endColor="#C0C0C0"
android:startColor="#FCD209"/>
<!-- 设置一一下边距-->
<padding
android:top="5px"
android:bottom="5px"
android:left="5px"
android:right="5px"/>
</shape>
(2)有圆角:在drawable目录下面定义shape类型的xml文件,在TextView的background属性中使用
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!--设置一个黑色宽度为5px的一个边框-->
<stroke android:color="#000000" android:width="5px"/>
<!-- 设置边距-->
<padding
android:top="5dp"
android:bottom="5dp"
android:left="5dp"
android:right="5dp"/>
<!-- 设置一个透明背景色-->
<solid android:color="#87CEEB"/>
<!-- 设置圆角-->
<corners
android:bottomLeftRadius="50px"
android:bottomRightRadius="50px"
android:topLeftRadius="50px"
android:topRightRadius="50px"/>
</shape>
实例二:带有图片的TextView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"> <TextView
android:id="@+id/text1"
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="Android"
android:textColor="#cd0000"
android:textStyle="bold"
android:drawableTop="@mipmap/ic_launcher"
android:drawableBottom="@mipmap/ic_launcher"
android:drawableLeft="@mipmap/ic_launcher"
android:drawableRight="@mipmap/ic_launcher"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/text2"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="Android1"
android:textColor="#cd0000"
android:textStyle="bold"
android:drawableTop="@mipmap/ic_launcher"
/>
<TextView
android:id="@+id/text3"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="Android2"
android:textColor="#cd0000"
android:textStyle="bold"
android:drawableTop="@mipmap/ic_launcher"
/>
<TextView
android:id="@+id/text4"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="Android3"
android:textColor="#cd0000"
android:textStyle="bold"
android:drawableTop="@mipmap/ic_launcher"
/>
<TextView
android:id="@+id/text5"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="Android4"
android:textColor="#cd0000"
android:textStyle="bold"
android:drawableTop="@mipmap/ic_launcher"
/>
</LinearLayout>
</LinearLayout>
属性讲解:
drawableTop(上),drawableButtom(下),drawableLeft(左),drawableRight(右) 另外也可以使用drawablePadding来设置图片与文字间的间距!与此同时我们会发现在xml文件中不能设置图片的的大小,这时我们需要在Java中实现
import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.TextView; public class MainActivity extends Activity {
private TextView textView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView1 = (TextView) findViewById(R.id.text1);
// 数组下标是0~3,依次是左上右下
Drawable[] drawables = textView1.getCompoundDrawables();
// 设置上面图片的大小
drawables[1].setBounds(200,0,200,200);
// 给TextView是四个方向设置图片也是左上右下,如果某个方向上面没有图片设置为null即可
textView1.setCompoundDrawables(drawables[0],drawables[1],drawables[2],drawables[3]);
}
}
实例三:使用autoLink属性识别链接类型
当文字中出现了URL,E-Mail,电话号码,地图的时候,我们可以通过设置autoLink属性;当我们点击 文字中对应部分的文字,即可跳转至某默认APP,比如一串号码,点击后跳转至拨号界面!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"> <TextView
android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="百度http://baidu.com"
android:autoLink="web"
android:textColor="#cd0000"
android:textStyle="bold"
/>
<TextView
android:id="@+id/text2"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:textSize="20sp"
android:background="#ccffee"
android:padding="3sp"
android:text="123456"
android:autoLink="phone"
android:textColor="#cd0000"
android:textStyle="bold"
/>
</LinearLayout>
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZYAAAKuCAIAAAANW62cAAAgAElEQVR4nO3deVxU9f748XNmgGERUXADRHHJBTcQQQQVFzYte7TZ91b3a9bvZlnfbtlipXZdurdwybSUfcdd3MUl932budliqWXZ4pZCy71dq1vy++MDxxEGBEXxHa/n4/3oIWfOnFmEl2f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dj4+Pv+rb//YJ8/Hx6dy5s/2lERER6uh+9RPm4+PTq1cv4xVfxfXLJaxBgwYNGjQwLvXy8lKH0rp3717urc+YmBiz2VxFwtTrU+Oi9u3bV5EwNze3AQMGGCubTCYjYS1btjRWM5vNAwcOVP9CJiQk3DrvQgLCVJGwhg0bxsXFGT+NXl5e6ohgYGBgaGiocXSwWbNmFfdU7RNmNptjY2ONcHh7e6vj7trVEhYSEmK8IxkVFeXj46Ne0g8aNMh4YWg2m9XB9XIJ8/LyioiIMO5kUFCQOi3D3d09ISHBeKeybdu26hyIKhIWFham3oJUz8mAAQOqSJimabGxscYr68DAQCNh0dHRxhupTk5OCQkJ6u61a9cuODjYuDr/ByagBqpImKZprVu3jo+PDw4OjoyM7Nevn1poMpm6dOkSExMTHBwcHR3ds2fPigcLy53a6u7urk7R6t2798CBAz08PFREqk6YOpIVHBwcFxfXvXt34yKz2RwdHR0VFdWzZ8+YmBh/f39d1yu+kOzUqVNsbGxwcPDAgQMjIyON5c2aNRsyZEhwcHC/fv0iIiLUq8gqEqZOLgkODg4PDw8NDVXvzFaRMD8/v7i4uJCQkH79+rVu3Xrw4MEqYbquDxw4sF+/fsHBwfHx8cZJ/yaTqVu3bsbzaZ8zAFfh6upaxeei1Q+qj4+PcXaYWq5e0Bmnehk7NVUwm82NGjVS+2LVeX9XvZBUt64yYR9KJyenBg0aVPy/3to3yNnZ2cnJycfHR5Wo3PEmHx8f9cDt74z91Z2cnIzXd7qu+/j4qBKpu2HseFZ2dr5x3+xPu3dycvLw8DB2Jw0uLi72zyeA6vj/zdq6CSy+lSoAAAAASUVORK5CYII=" alt="" width="270" height="393" />
说明:all就是全部都包含,自动识别协议头~ 在Java代码中可以调用setAutoLinkMask(Linkify.ALL); 这个时候可以不写协议头,autolink会自动识别,但是还要为这个TextView设置: setMovementMethod(LinkMovementMethod.getInstance()); 不然点击了是没效果的!
实例四:TextView对html的支持
说明:不是所有的html标签都支持,常用如下:
- <font>:设置颜色和字体。
- <big>:设置字体大号
- <small>:设置字体小号
- <i><b>:斜体粗体
- <a>:连接网址
- <img>:图片
package com.example.test3; //文字和链接
import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.widget.TextView; public class MainActivity extends Activity {
private TextView textView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView1 = (TextView) findViewById(R.id.text1);
// 定义html字符串
String s1 = "<font color='blue'><b>百度一下,你就知道~:</b></font><br>";
s1 += "<a href = 'http://www.baidu.com'>百度</a>";
// 设置给TextView,需要调用Html.fromHtml()方法
textView1.setText(Html.fromHtml(s1));
// 设置链接的类型,如果是all可以不写协议头,会自动识别
textView1.setAutoLinkMask(Linkify.ALL);
// 在Java中调用链接,需要设置下面的方法,不然没有作用
textView1.setMovementMethod(LinkMovementMethod.getInstance());
}
}
package com.example.test3; //图片
import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.widget.TextView; import java.lang.reflect.Field; public class MainActivity extends Activity {
private TextView textView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView1 = (TextView) findViewById(R.id.text1);
String s1 = "图片:<img src = 'ic_launcher'/><br>";
textView1.setText(Html.fromHtml(s1, new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
Drawable draw = null;
try {
// 得到图片的位置
Field field = R.mipmap.class.getField(source);
// 得到图片的id
int resourceId = Integer.parseInt(field.get(null).toString());
// 得到图片
draw = getResources().getDrawable(resourceId);
// 设置图片的大小
draw.setBounds(0, 0, draw.getIntrinsicWidth(), draw.getIntrinsicHeight());
} catch (Exception e) {
e.printStackTrace();
}
return draw;
}
}, null));
}
}
实例四:SpannableString&SpannableStringBuilder定制文本
(1)首先SpannableString、SpannableStringBuilder基本上与String差不多,也是用来存储字符串,但它们俩的 特殊就在于有一个SetSpan()函数,能给这些存储的String添加各种格式或者称样式(Span),将原来的String以不同的样式显示出来, 比如在原来String上加下划线、加背景色、改变字体颜色、用图片把指定的文字给替换掉,等等。所以,总而言之,SpannableString、 SpannableStringBuilder与String一样, 首先也是传字符串,但SpannableString、 SpannableStringBuilder可以对这些字符串添加额外的样式信息,但String则不行。
(2)注意:如果这些额外信息能被所 用的方式支持,比如将SpannableString传给TextView;也有对这些额外信息不支持的。对于不 支持的情况,SpannableString和SpannableStringBuilder就是退化为String类型,直接显示原来的String字 符串,而不会再显示这些附加的额外信息。
(3)它们的区别在于 SpannableString像一个String一样,构造对象的时候传入一个String,之后再无法更改String的内容,也无法拼接多个 SpannableString;而SpannableStringBuilder则更像是StringBuilder,它可以通过其append()方 法来拼接多个String:
(4)void setSpan (Object what, int start, int end, int flags)
函
数意义:给SpannableString或SpannableStringBuilder特定范围的字符串设定Span样式,可以设置多个(比如同时加
上下划线和删除线等),Falg参数标识了当在所标记范围前和标记范围后紧贴着插入新字符时的动作,即是否对新插入的字符应用同样的样式。(这个后面会具
体举例说明)
参数说明:
object what :对应的各种Span,后面会提到;
int start:开始应用指定Span的位置,索引从0开始
int end:结束应用指定Span的位置,特效并不包括这个位置。比如如果这里数为3(即第4个字符),第4个字符不会有任何特效。从下面的例子也可以看出来。
int flags:取值有如下四个
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE:前后都不包括,即在指定范围的前面和后面插入新字符都不会应用新样式
Spannable.SPAN_EXCLUSIVE_INCLUSIVE :前面不包括,后面包括。即仅在范围字符的后面插入新字符时会应用新样式
Spannable.SPAN_INCLUSIVE_EXCLUSIVE :前面包括,后面不包括。
Spannable.SPAN_INCLUSIVE_INCLUSIVE :前后都包括。
(5)对应的各种Object:
- BackgroundColorSpan 背景色
- ClickableSpan 文本可点击,有点击事件
- ForegroundColorSpan 文本颜色(前景色)
- MaskFilterSpan 修饰效果,如模糊(BlurMaskFilter)、浮雕(EmbossMaskFilter)
- MetricAffectingSpan 父类,一般不用
- RasterizerSpan 光栅效果
- StrikethroughSpan 删除线(中划线)
- SuggestionSpan 相当于占位符
- UnderlineSpan 下划线
- AbsoluteSizeSpan 绝对大小(文本字体)
- DynamicDrawableSpan 设置图片,基于文本基线或底部对齐。
- ImageSpan 图片
- RelativeSizeSpan 相对大小(文本字体)
- ReplacementSpan 父类,一般不用
- ScaleXSpan 基于x轴缩放
- StyleSpan 字体样式:粗体、斜体等
- SubscriptSpan 下标(数学公式会用到)
- SuperscriptSpan 上标(数学公式会用到)
- TextAppearanceSpan 文本外貌(包括字体、大小、样式和颜色)
- TypefaceSpan 文本字体
- URLSpan 文本超链接
(6)实例
import android.app.Activity;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.text.style.ImageSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
import android.widget.TextView; public class MainActivity extends Activity {
private TextView textView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView1 = (TextView) findViewById(R.id.text1);
SpannableString span = new SpannableString("红色打电话斜体删除线绿色下划线图片:.");
//1.设置背景色,setSpan时需要指定的flag,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE(前后都不包括)
span.setSpan(new ForegroundColorSpan(Color.RED), 0, 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//2.用超链接标记文本
span.setSpan(new URLSpan("tel:123456"), 2, 5, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
//3.用样式标记文本(斜体)
span.setSpan(new StyleSpan(Typeface.BOLD_ITALIC), 5, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//4.用删除线标记文本
span.setSpan(new StrikethroughSpan(), 7, 10, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//5.用下划线标记文本
span.setSpan(new UnderlineSpan(), 10, 16, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//6.用颜色标记
span.setSpan(new ForegroundColorSpan(Color.GREEN), 10, 13,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//7.//获取Drawable资源
Drawable d = getResources().getDrawable(R.mipmap.ic_launcher);
d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
//8.创建ImageSpan,然后用ImageSpan来替换文本
ImageSpan imgspan = new ImageSpan(d, ImageSpan.ALIGN_BASELINE);
span.setSpan(imgspan, 18, 19, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
textView1.setText(span);
}
}
package com.example.test3;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ImageSpan;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast; public class MainActivity extends Activity {
private TextView textView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView1 = (TextView) findViewById(R.id.text1);
StringBuffer sb = new StringBuffer();
for(int i = 0;i < 20;i++){
sb.append("好友" + i + ",");
}
String user = sb.substring(0,sb.lastIndexOf(",")).toString();
textView1.setMovementMethod(LinkMovementMethod.getInstance());
textView1.setText(addClickPart(user), TextView.BufferType.SPANNABLE);
} private SpannableStringBuilder addClickPart(String str) {
// 定义点赞的图标
ImageSpan imgspan = new ImageSpan(MainActivity.this,R.mipmap.ic_launcher);
imgspan.getDrawable().setBounds(0,0,imgspan.getDrawable().getIntrinsicWidth(),imgspan.getDrawable().getIntrinsicHeight());
SpannableString ss = new SpannableString("p.");
ss.setSpan(imgspan,0,1, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
// 连接多个字符串
SpannableStringBuilder ssb = new SpannableStringBuilder(ss);
ssb.append(str);
String[] users = str.split(",");
if(users.length > 0){
for(int i = 0;i < users.length;i++){
final String name = users[i];
final int start =str.indexOf(name) + ss.length();
ssb.setSpan(new ClickableSpan() {
@Override
public void onClick(View view) {
Toast.makeText(MainActivity.this, name,
Toast.LENGTH_SHORT).show();
}
@Override
public void updateDrawState(TextPaint ds) {
super.updateDrawState(ds);
//删除下划线,设置字体颜色为蓝色
ds.setColor(Color.BLUE);
ds.setUnderlineText(false);
}
},start,start + name.length(),0); }
}
return ssb.append("等" + users.length + "个人觉得很赞");
}
}
实例五:跑马灯
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@+id/txtOne"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="你整天说着日了狗日了狗,但是你却没有来,呵呵呵呵呵呵呵呵呵呵~"/>
</LinearLayout>
实例六:行间距、字间距、自动换行(默认是自动换行)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<!-- 自动换行-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:singleLine="false"
android:text="呵呵呵呵呵呵呵呵呵呵~~~~~~~~~~aaaaaa"
android:maxLines="5"/>
<!-- 字符间距-->
<TextView
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:textScaleX="2.0"
android:text="呵呵呵呵呵呵呵呵呵呵~~~~~~~~~~aaaaaa"/>
<!-- 行间距lineSpacingExtra设置大小、lineSpacingMultiplier设置行的倍数默认是1。0-->
<TextView
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:lineSpacingExtra="10dp"
android:text="呵呵呵呵呵呵呵呵呵呵~~~~~~~~~~aaaaaa"/>
<TextView
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:lineSpacingMultiplier="1.5"
android:text="呵呵呵呵呵呵呵呵呵呵~~~~~~~~~~aaaaaa"/>
</LinearLayout>
android基本控件学习-----TextView的更多相关文章
- Android UI控件:TextView
TextVIew的属性详解 android:autoLink设置是否当文本为URL链接/email/电话号码/map时,文本显示为可点击的链接.可选值(none/web /email/phone/ma ...
- android基本控件学习-----Button
Button讲解: 一.在我们实际的使用button的时候经常会对button不同状态会有不同的显示,在讲解Button前,首先对drawable下面的statelistdrawable的相关知识讲一 ...
- android基本控件学习-----ImageView
ImageView的讲解 一.src和background的区别 background我们通常理解是背景,而src是内容,当使用src填入图片的时候是以图片的大小直接填充,并不会进行拉伸,而backg ...
- android基本控件学习-----Date&Time
Date&Time这里一共讲解下面6个: TextClock(文本时钟),AnalogClock(模拟时钟),Chronometer(计时器),DatePicker(日期选择器),TimePi ...
- android基本控件学习-----EditText
EditText的讲解 一.<实例一>:用户登录 <?xml version="1.0" encoding="utf-8"?> < ...
- android基本控件学习-----RadioButton&CheckBox
RadioButton(单选框)和CheckBox(复选框)讲解: 一.基本用法和事件处理 (1)RadioButton单选框,就是只能选择其中的一个,我们在使用的时候需要将RadioButton放到 ...
- android基本控件学习-----SeekBar&RatingBar
SeekBar(拖动条)和RatingBar(星级评分条)讲解 一.SeekBar(拖动条) (1)拖动条简单理解就是可以拖动的线,这个对我们来讲很常见,比如视频播放或者音乐播放我们拖动播放的进度,下 ...
- android基本控件学习-----ScrollView
ScrollView(滚动条)的讲解: 一.对于ScrollView滚动条还是很好理解的,共有两种水平和垂直,ScrollView和HorizontalScrollview,这个里面不知道该总结写什么 ...
- android基本控件学习-----ToggleButton&Switch
ToggleButton(开关按钮)和Switch(开关)讲解: 一.核心属性讲解: (1)ToggleButton textOn:按钮被选中的时候文字显示 textOff:按钮没有被选中的时候文字显 ...
随机推荐
- AB test学习笔记
AB Test 介绍: https://vwo.com/ab-testing/ AB Test 的意义: 数据分析告诉我们要不要去做一件事情,ab 实验反馈告诉我们我们做得好不好,哪里有问题,以及衡量 ...
- jsp中的文件上传
首先需要有以下的jar包 jsp代码如下: <!-- ${pageContext.request.contextPath}为: "/" + 当前项目名 --> < ...
- SQL Server中的日期,时间组合查询
如图所示,Jdate和Jdate2是两个分开的字段,一个是date类型,存储日期,一个是time(0)类型,存储具体时间 现在有这样的要求,就是获得(Jdate和Jdate2组合起来的日期时间)在(当 ...
- CentOS下安装php gd库报错Error: php56w-common conflicts with php-common-5.3.3-48.el6_8.x86_64
因为服务器缺少php gd库,因为系统是centos,就是用yum去安装,一安装就报错如下: [root@iZ28sdxghs2Z ~]# yum install php-gd Loaded plug ...
- Storm: 遇到问题总结
1.没有ack : kafkaspout id 重复导致每次读最新没有数据. 2.由于storm提供的读取kafka的enternal工具存在bug,导致重复读取数据,致使数据不准确.storm bu ...
- mysql--timestamp加减
利用timestamp()对timestamp类型进行秒加减操作: 1.加10秒: 2.减10秒:
- VS2010Datatable查看器查看超时(Microsoft.VisualStudio.DebuggerVisualizers)
这个问题由来已久,却一直没有找到原因.大家都知道,VisualStudio的DebuggerVisualizers是一个非常方便的插件,可以帮助我们调试时查看Datatable视图,前阵子突然发现在查 ...
- 商品评分效果JavaScript
<script> window.onload=function(){ //----------选中的星星会多出一个属性:isClick="true" 藉此来获取评分-- ...
- C#入门篇5-7:流程控制语句 continue语句
#region continue语句 public class ContinueApp { public static void Fun1() { //标签打印显示1…30,若能被3整除则不打印. ; ...
- Android数据储存之SharedPreferences
Android中SharedPreferences通常与Editor连用 接口SharedPreferences常用方法: boolean contains(String str):判断SharedP ...