问题描述
我有一个电视应用程序。这是清单中的一项。一旦某个项目聚焦我就缩放它(尝试使用 v.animate.scale
和使用倾斜行效果进行缩放 ->ListRowPresenter(FocusHighlight.ZOOM_FACTOR_SMALL)
因此,在缩放我的 textView 的任何这些方法之后,在 ellipsize="marquee"
期间开始滞后。我100% 确定它已连接,因为一旦禁用缩放工作完美。
也许有人看到了类似的问题?以及解决此 ANDROID 错误的可能方法是什么?
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:id="@+id/main_container"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
android:padding="1dp">
<RelativeLayout
android:id="@+id/..."
android:layout_width="wrap_content"
android:layout_height="wrap_content">
...
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/..."
android:layout_alignStart="@+id/..."
android:layout_alignEnd="@+id/..."
android:orientation="vertical">
<TextView <!--HERE!!!!!-->
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:gravity="center_horizontal"
android:paddingTop="2dp"
android:singleLine="true"
android:text="Name"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
</RelativeLayout>
</layout>
解决方法
如果有人需要解决方案,请忽略文本(容器)的比例
white-space: nowrap;
文本滚动没有任何滞后。