微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

自动可调的textview改变高度android

如何解决自动可调的textview改变高度android

我有一个文本大小为自动Textview 我正在 API 响应中分配文本,但它的高度正在改变。

我怎样才能改变它的高度我设置了最小和最大线修复来设置固定高度,但在某些情况下它不起作用

<TextView
        android:id="@+id/tvFeedTitle"
        style="@style/komuTitle"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:autoSizeMaxTextSize="@dimen/Feed_header_font_max_size"
        android:autoSizeMinTextSize="@dimen/Feed_header_font_size"
        android:autoSizeTextType="uniform"
        android:ellipsize="end"
        android:maxLines="3"
        android:minLines="3"
        android:text="Covid News Live Updates: After Pfizer,Serum Institute seeks indemnity over COVID-19 vaccine,says sources"
        android:textColor="@color/white"
        android:textSize="@dimen/Feed_header_font_size"
        app:layout_constraintTop_toBottomOf="@+id/imgFeed"
        app:layout_constraintEnd_toEndOf="@id/guideline2"
        app:layout_constraintStart_toStartOf="@id/guideline" />

这是我的Textview

1

enter image description here

2

enter image description here

我正在显示 Recyclerview 中的所有内容

请帮助我,任何帮助将不胜感激。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。