Android 当视图显示不完整时,将其设置为“已关闭”

Android 当视图显示不完整时,将其设置为“已关闭”,android,android-layout,Android,Android Layout,有一个水平的线性布局,在线性布局中有一些文本视图。某些文本视图已消失或可视性取决于数据 TextView中的文本不是固定的。当文本太长时。它将显示局部的 某些文本视图已消失或可视性取决于数据 例如 the 1st TextView is "qwerty", it width is 100dp the 2st TextView is "qwerty", it width is 100dp the 3st TextView is "qwerty", it width is 100dp

有一个水平的线性布局,在线性布局中有一些文本视图。某些文本视图已消失或可视性取决于数据
TextView中的文本不是固定的。当文本太长时。它将显示局部的
某些文本视图已消失或可视性取决于数据
例如

the 1st TextView is  "qwerty", it width is 100dp  
the 2st TextView is  "qwerty", it width is 100dp 
the 3st TextView is  "qwerty", it width is 100dp 
the 4st TextView is  "qwerty", it width is 100dp 
the LinearLayout's width is 280dp 
所以隐藏3st文本视图和4st文本视图


RecyclerView中的LinearLayout,因此无法删除该子项,因为该子项将在其他项目中重复使用。并且在快速滚动时,不需要太多时间来测量宽度,以防出现垃圾。

您可以使其水平滚动 或者,线性布局的权重总和为2,两个文本的权重为1,宽度为0dp,高度为0