android 约束布局一行多个布局,超过省略号

参考网站:https://blog.csdn.net/u013750244/article/details/97278302/
为了自己忘记,找的时候好找,所以记录下

image.png

如上图,右边TextView时刻跟着左边TextView跑,当左边的View特别长需要省略时,右边布局就得靠右,
image.png

以前一直没找到方案,一直都是代码中算的,最后发现使用约束布局的解决方案:

              

            

重要的几点:
左边布局
android:layout_width="0dp"
app:layout_constraintWidth_default="wrap"
app:layout_constraintHorizontal_bias="0"
右边布局:
跟着链表链上就行,如果多个,后面的跟着链上就可以。

你可能感兴趣的:(android 约束布局一行多个布局,超过省略号)