I'm designing a Sudoku that works with a list of words instead of numbers. For the layout I've used constraintLayout. I'm facing an issue, however when a word is too big to fit into a cell. Any idea how can I fix that? p.s sorry first time posting here. So not sure if I'm doing it the right way.
可以将文章内容翻译成中文,广告屏蔽插件会导致该功能失效:
问题:
回答1:
You can use this library in order to make your text automatically resize and fit the view.
By using this library you don't have to worry about when to change the text size and if it will fit to the view or not.
Here is how to use is:
1) Add dependencies to grade:
implementation 'me.grantland:autofittextview:0.2.1'
2) Add your textView into your layout:
<me.grantland.widget.AutofitTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textSize="12sp"
app:minTextSize="8sp" />