有没有一种方法可以自动调整按钮文字的大小,使其尽可能大,同时保持在一行内,并且仍适合按钮中?
有没有一种方法可以自动调整按钮文字的大小,使其尽可能大,同时保持在一行内,并且仍适合按钮中?
请查看 自动调整文本视图大小(支持 API 级别 14)。
例如
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:text="Some text"
app:autoSizeTextType="uniform" />
app:autoSizeTextType
。