ANDROID笔记:TextView的简单使用
2013-10-15 09:05
465 查看
<?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/textView1" android:layout_width="100dp" android:layout_height="wrap_content" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:marqueeRepeatLimit="marquee_forever" android:singleLine="true" android:text="adsfsadfsdafsdfdsadddddddaaaaaaaaaaaaa" /> <!-- 链接邮箱 --> <TextView android:id="@+id/textView2" android:layout_width="100dp" android:layout_height="wrap_content" android:autoLink="email" android:text="110@qq.com" /> <!-- 链接拨号 --> <TextView android:id="@+id/textView3" android:layout_width="100dp" android:layout_height="wrap_content" android:autoLink="phone" android:text="1383838438" /> <!-- 链接浏览器 --> <TextView android:id="@+id/textView4" android:layout_width="100dp" android:layout_height="wrap_content" android:autoLink="web" android:text="www.baidu.com" /> <!-- 阴影 --> <TextView android:id="@+id/textView5" android:layout_width="100dp" android:layout_height="wrap_content" android:shadowColor="#0000ff" android:shadowDx="20" android:shadowDy="0" android:shadowRadius="3" android:text="测试阴影" android:textColor="#ff0000" android:textSize="30sp" /> </LinearLayout>
实现跑马灯的主要属性:
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever"
android:singleLine="true"
TextView超出部分的省略号属性:
android:ellipsize="end"
相关文章推荐
- ANDROID笔记:AutoCompleteTextView的简单使用
- Android中的AutoCompleteTextView(随笔提示文本)组件的简单使用
- android:AutoCompleteTextView和MultAutoCompleteTextView的简单使用
- Android控件笔记——使用TextView实现跑马灯效果
- Android中的AutoCompleteTextView(随笔提示文本)组件的简单使用
- android LocationManager的简单使用(获取经纬度信息到textview显示)
- Day3.2--Android简单UI控件之TextView的高级使用--SpannableString的使用
- android中使用DatePickerDialog和AutoCompleteTextView简单使用
- Android笔记之TextView中使用Drawable
- android 自定义view学习笔记————Paint和Canvas的简单使用
- 【Android基础笔记04】Spinner 和 AutoCompleteTextView 基本适配器控件的使用
- android应用开发揭秘例4-3笔记(TextView的使用)
- Android开发笔记之自定义view篇(入门一简单的TextView)
- Android笔记 简单demo Spinner AutoCompleteTextView Menu
- Android 高级UI设计笔记05:使用TextView实现跑马灯的效果
- Android 控件:AutoCompleteTextView,MultiAutoCompleteTextView ,TimePicker ,DatePicker,Spinner 的简单使用
- Android开发-EditView, Button, TextView的简单使用
- Android 笔记 RecyclerView的简单使用
- Android进阶学习-使用Canvas自定义简单TextView(1)
- android应用开发揭秘examples_04-10笔记(AutoCompleteTextView和MultiAutoCompleteTextView使用)