How to get N text that can be fit on Screen/TextView with a specific size?

前端 未结 3 1708
耶瑟儿~
耶瑟儿~ 2021-02-04 14:42

I have a large story in String format. I want to show the text in gallery. What I want to do is to slice all the text in such a way that all my view in gallery show the text whi

3条回答
  •  我在风中等你
    2021-02-04 15:14

    if each part has a different number of characters , they will also need to have different size of fonts . not only that , but too small devices will also have a too small font size , since the text need to fit a smaller space. i'd suggest having the same font size for all of the parts , while allowing to scroll down if there is not enough space.

    for this , you can use a viewpager with scrollviews on each page , each contain a textview.

提交回复
热议问题