【发布时间】:2016-02-20 03:55:41
【问题描述】:
在某些 Android 设备(带有 Android L 和 M 的 LG Google Nexus 5)上,带有 android:ellipsize="marquee" 的 TextView 和填充会导致文本溢出 textview。它发生在 TextView 的右侧而不是左侧,而填充同时应用于左侧和右侧。
在配备 Android K 和 L 的三星 Galaxy S3 和 S6 上不会出现这种情况。
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:freezesText="true"
android:alpha="0.85"
android:background="@color/by433_gray_darker"
android:textColor="@color/white"
android:textSize="11sp" />
我可以做些什么来解决或解决这个问题?
【问题讨论】:
标签: android textview ellipsis nexus-5