Issue
Is there a way to determine when the text will be truncated when using number of lines ? Have been searching everywhere and no clear answer. Thank you!
Solution
You can use numberOfLines
as a props for <Text />
component. Its depend on the width of your component then calculate the length of the text. This prop is commonly used with ellipsizeMode
.
Example:
<Text numberOfLines={2} ellipsizeMode='tail'>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</Text>
Answered By - namth
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.