android 剪切文本,Constraint Layout android中正在剪切文本

我使用下面的布局来实现约束布局右端的图像视图,以及图像左侧的文本:

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:tools="http://schemas.android.com/tools"

android:orientation="vertical"

android:layout_width="match_parent"

android:layout_height="match_parent">

android:id="@+id/parentPanel"

android:layout_width="wrap_content"

android:layout_height="wrap_content">

android:id="@+id/image"

android:layout_width="64dp"

android:layout_height="64dp"

app:layout_constraintRight_toRightOf="parent"

android:background="#ff0000"/>

android:id="@+id/txt"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Lorem Ipsum is simply dummy text of the printing

and typesetting industry. Lorem Ipsum has been the industry's

standard dummy text ever since the 1500s, when an unknown printer took

a galley of type and scrambled it to make a type specimen book"

app:layout_constraintTop_toTopOf="parent"

app:layout_constraintBottom_toBottomOf="parent"

app:layout_constraintRight_toLeftOf="@+id/image"

android:textColor="#000000"

android:textSize="20sp"/>

constraint.ConstraintLayout>

我附上了从上面的XML获得的UI的截图.当文本太长时,文本将被剪切在左侧.

build.gradle中使用的依赖项是:

编译’com.android.support.constraint:constraint-layout:1.0.1′

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值