<TextView    android:id="@+id/homework_name"    android:layout_width="wrap_content"    android:layout_height="30dp"    android:layout_alignParentLeft="true"    android:layout_below="@+id/homework_classname"    android:layout_toRightOf="@+id/homework"    android:layout_marginLeft="10dp"    android:ellipsize="end"    android:maxEms="12"    android:singleLine="true"    android:text=""    android:textColor="@color/black6"    android:textSize="16sp" />

设置了

android:ellipsize="end"
android:maxEms="12"
android:singleLine="true" 三个属性,但是 没有出现 到一定字符长度之后进行限制。经测试,把 toRightOf 这个属性去了就有了。 应该是 toRightOf 在布局中的权重比 maxEms 这三个组合的高。 去掉就OK 了

更多相关文章

  1. 关于Android的问号?和@符号的用法
  2. android ListView Item和CheckBox、Button点击事件冲突的问题
  3. 安卓开发36:layout对齐属性总结
  4. (转)Android(安卓)AndroidManifest.xml文件的android:supportsRtl
  5. 1. 2 Textview 及其子类
  6. Android使用FrameLayout应该注意的地方
  7. android 屏幕方向切换 锁定方向
  8. Android(安卓)布局之TableLayout
  9. Android在layout xml中使用include

随机推荐

  1. 【Android】课程表布局实现(支持动态添加
  2. android app 用什么语言开发的
  3. Android视频编辑器(五)音频编解码、从视频
  4. Qt android 设置系统状态栏为全透明,半透
  5. android 和 wpf的差距
  6. Android6.0 WMS(六) WMS动画管理
  7. Android面经:入职网易的那一天,我哭了(被裁
  8. android 简单记事本开发(一)
  9. [置顶] android调用第三方库——第三篇—
  10. Android(安卓)窗帘(Curtain)效果二之波浪