In the TextView of Android
Also set
Android : Maxwidth= "155DP"
Android : lines= "1"
Android : ellipsize= "End"
When running on some phones, when the length of the TextView is more than 155DP, it will be found that the last displayed length does not reach 155DP, even the difference is very wide,
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= " Https://s5.51cto.com/wyfs02/M00/8D/9A/wKioL1ijyufQ3kFfAABZMhs4bLk772.png-wh_500x0-wm_3-wmp_4-s_2074796271.png " Title= "4zd@ (0o0c}5dak%4) jaa[cq.png" alt= "Wkiol1ijyufq3kffaabzmhs4blk772.png-wh_50"/>
Workaround:
Put
android:lines= "1"
Replaced by
Android:singleline= "true"
That
Android : Maxwidth= "155DP"
Android : singleline= "true"
Android : ellipsize= "End"
Get results
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8D/9A/wKioL1ijzCfxY9FgAABTyPCTRHw929.png-wh_500x0-wm_ 3-wmp_4-s_706553173.png "title=" $FDDOJ 6dmt@]tm~5s_rc_ft.png "alt=" Wkiol1ijzcfxy9fgaabtypctrhw929.png-wh_50 "/>
Android TextView the problem of overall shortening when setting the single-line maximum width and ellipsize ellipsis