Android开发-TextViewDemo-AndroidStudio
来源:互联网 发布:淘宝平均停留时长 编辑:程序博客网 时间:2024/06/05 17:33
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <!--我是默认的textView--> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="我是默认的textView" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是改变字体大小和字体颜色的textView--> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:text="我是改变字体大小和字体颜色的textView" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是固定宽度的textView--> <TextView android:layout_width="200dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:text="我是固定宽度的textView123456789" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是singleLine过时方法--> <TextView android:layout_width="200dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:singleLine="true" android:text="我是singleLine过时方法123456789" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是singleLine省略号在中间--> <TextView android:layout_width="200dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:singleLine="true" android:ellipsize="middle" android:text="我是singleLine省略号在中间123456789123456789" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是singleLine省略号在开始--> <TextView android:layout_width="200dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:singleLine="true" android:ellipsize="start" android:text="我是singleLine省略号在开始123456789123456789" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是maxLines省略号在结尾--> <TextView android:layout_width="200dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:maxLines="1" android:ellipsize="end" android:text="我是maxLines省略号在结尾123456789123456789" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是singleLine跑马灯--> <TextView android:layout_width="200dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#ff00ff" android:singleLine="true" android:ellipsize="marquee" android:marqueeRepeatLimit="marquee_forever" android:focusable="true" android:focusableInTouchMode="true" android:text="我是singleLine跑马灯123456789123456789" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是drawableLeft--> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@mipmap/ic_launcher" android:text="我是drawableLeft" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是drawableBottom--> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableBottom="@mipmap/ic_launcher" android:text="我是drawableBottom" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是autoLink:phone--> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="1" android:autoLink="phone" android:text="我是autoLink:phone 13800138000 点击进入拨号界面" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是autoLink:web--> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:autoLink="web" android:text="我是autoLink:web http://blog.csdn.net/iwanghang 点击打开博客" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /> <!--我是autoLink:email--> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:maxLines="2" android:autoLink="email" android:text="我是autoLink:email iwanghang@qq.com 点击发送邮件" /> <!--我是分割--> <ImageView android:layout_width="fill_parent" android:layout_height="0.3dp" android:background="#D6D6D6" /></LinearLayout>
3 0
- Android开发-TextViewDemo-AndroidStudio
- Android开发-EditTextDemo-AndroidStudio
- Android开发-ImageViewDemo-AndroidStudio
- Android开发中Androidstudio快捷键
- Android开发-selector-setSelected-AndroidStudio
- Android 开发环境搭建(AndroidStudio)
- Android开发-ListView(1)-AndroidStudio
- Android开发-魔窗DeeplinkDemo-AndroidStudio
- Android开发AndroidStudio多渠道打包
- Android-Androidstudio集成git开发环境
- Android-androidstudio懒惰开发-必备插件
- Android开发-SQLiteDemo增删改查-AndroidStudio
- Android开发-点击进入拨号界面-AndroidStudio
- Android开发-Fragment返回键监听-AndroidStudio
- Android开发-ScrollView简单实现滚动-AndroidStudio
- Android开发-Intent传递ArrayList-AndroidStudio
- Android开发-Intent传递数值-AndroidStudio
- Android开发&AndroidStudio安装后配置
- 《自己动手设计数据库》第一部分摘录
- onTouchEvent(一) 你所必须知道的坐标详解
- OpenStack 网络实现(上)
- 对组件化架构的再思考
- python文件读写和整理
- Android开发-TextViewDemo-AndroidStudio
- Genymotion用不了,VirtualBox虚拟机出现问题,请看最后一招
- mysql blog
- 严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start componen
- Eclipse 关联jar包乱码
- Lua 基本语法
- excel比较两列不同
- JDK1.8 HashSet
- linux环境下编写shell脚本启动和关闭jar包服务程序