首页 > 解决方案 > android中的TextView在右侧留下空白。如何调整这个

问题描述

如何调整文本不显示空格。我见过许多应用程序可以完美地显示文本而没有任何间隙。

这是我用来生成此输出的 XML。

<TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/text"
                android:id="@+id/title"
                android:autoLink="all"
                android:autoSizeTextType="uniform"
                android:linksClickable="true"
                android:text="Description Of the News"
                android:textColor="#000000"
                android:textSize="20sp"
                android:lineHeight="5dp"
                android:padding="12dp"

                />

我已经尝试过autosize,但它也不完美。

在此处输入图像描述

标签: javaandroidxmltextview

解决方案


这个问题已经由Frank Cheng回答了较旧的 android 版本。从 android oreo 开始,您可以使用合理的文本视图来更好地优化应用程序。


推荐阅读