简体   繁体   English

反应本机文本问题

[英]React native text issue

I was just creating app calculate user amount with some and display into text.Issue I facing when user amount is too long the result in the text splits like for example result amount is like Rs 7004505400089090760 it display in Text like Rs 70 045054000890760 splits amount like this i have to show in single in react native.guys pls help me. 我只是创建一个应用程序来计算用户数量并显示为文本。问题是当用户数量太长时,文本拆分结果会面对,例如结果金额为7004505400089090760卢比,文本显示为70 045054000890760卢比我必须在本机反应中单独显示这一点。 I have tried PixelRatio also if there is any possible to reduce size dynamically in react native? 我也尝试过PixelRatio是否有可能在react native中动态减小大小?

The most sophisticated approach in case of amount would be to round this off for user experience and from the perspective of shortening it , you would have to reduce the font size of the text and one more way to cut the text in an elegant manner would be using http://facebook.github.io/react-native/releases/0.46/docs/text.html#ellipsizemode 对于大量使用而言,最复杂的方法是四舍五入以获得更好的用户体验,从缩短它的角度来看,您将不得不减小文本的字体大小,而以一种优雅的方式剪切文本的另一种方法是使用http://facebook.github.io/react-native/releases/0.46/docs/text.html#ellipsizemode

this would just add '...' in place to let user know that text is truncated due to space. 这只会在位置添加“ ...”,以使用户知道文本由于空间而被截断。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM