java - 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
,但它也不完美。
解决方案
这个问题已经由Frank Cheng回答了较旧的 android 版本。从 android oreo 开始,您可以使用合理的文本视图来更好地优化应用程序。
推荐阅读
- swagger - 如何从 OpenAPI 模式中仅提取必填字段?
- c++ - 如何理解归并排序算法(递归)
- java - 使用 TBSCertificate 在 Java 中创建 X509 证书
- python - Matplotlib 行不会显示
- reactjs - 如何在 Material UI Labs Autocomplete 的 PopperComponent 内创建一个对话框按钮
- git - SubGit:Git 钩子,如果未锁定,则锁定 svn 文件,如果被其他用户锁定,则拒绝提交
- java - org.graphstream.algorithm.APSP$APSPInfo.getShortestPathTo 处的 NullPointerException - 图形问题
- elasticsearch - 无法在索引上设置 index.mapping.single_type: true
- reactjs - 将数组数组作为道具传递
- django - 自定义 Django Channels 中间件在 Websocket 连接之前未完成处理