最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

responsive design - How do I dynamically calculate the number of words that fit on a screen in React Native? - Stack Overflow

programmeradmin1浏览0评论

I'm building a book reader in React Native where the content is stored in segments (e.g., every 100 words) in a database. However, device resolutions and orientations vary so much that hardcoding a fixed word count per page isn't working out. I need a way to determine how many words can be displayed on the screen (or in a specific container) given the available width and height, as well as the current font and styling settings.

What is the best practice for dynamically calculating the number of words that will fit in a given container in React Native?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论