Demand:
Now has the level of two TextView, the front of the TextView length is not fixed, and requires that the back of the TextView close to the front, when the length of the front is too long to display the ellipsis, the back TextView close to the far right and to show all.
Solve:
<LinearLayoutAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:id= "@+id/ll_anniversary_tab_name"android:orientation= "Horizontal"Android:layout_alignparenttop= "true"Android:layout_alignparentleft= "true"> <TextViewAndroid:layout_width= "0DP"Android:layout_height= "Wrap_content"Android:layout_weight= "1"Android:lines= "1"Android:singleline= "true"android:ellipsize= "Middle"android:textsize= "16DP"Android:textcolor= "#000000"Android:text= "@string/about"Android:id= "@+id/tv_annversary_tab_name"/> <TextViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:textsize= "16DP"Android:lines= "1"Android:singleline= "true"Android:textcolor= "#2f80e6"Android:text= "@string/about"Android:id= "@+id/tv_annversary_tab_surffix"/> </LinearLayout>