Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. I get:
  2. [Test short][25] [END]
  3. desired:
  4. [Test short][25] [END]
  5. <!-- Works Great -->
  6. <LinearLayout
  7. android:layout_width="match_parent"
  8. android:layout_height="wrap_content"
  9. android:paddingBottom="8dp"
  10. android:orientation="horizontal"
  11. android:paddingTop="8dp">
  12.  
  13.  
  14.  
  15. <TextView
  16. android:id="@+id/longOrShort"
  17. android:layout_width="wrap_content"
  18. android:layout_height="wrap_content"
  19. android:layout_gravity="center"
  20. android:ellipsize="end"
  21. android:singleLine="true"
  22. android:textAppearance="@android:style/TextAppearance.Medium"
  23. android:textColor="@android:color/black"
  24. tools:text="Test short" />
  25.  
  26. <TextView
  27. android:id="@+id/hugleft"
  28. android:layout_width="0dp"
  29. android:layout_height="wrap_content"
  30. android:layout_weight="1"
  31. android:gravity="left"
  32. android:paddingLeft="4dp"
  33. tools:text="25" />
  34.  
  35. <TextView
  36. android:id="@+id/endText"
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:layout_gravity="center"
  40. android:text="END"
  41. android:visibility="visible" />
  42. </LinearLayout>
  43.  
  44.  
  45. <!-- Failure =( -->
  46.  
  47. LinearLayout
  48. android:layout_width="match_parent"
  49. android:layout_height="wrap_content"
  50. android:paddingBottom="8dp"
  51. android:orientation="horizontal"
  52. android:paddingTop="8dp">
  53.  
  54.  
  55.  
  56. <TextView
  57. android:id="@+id/longOrShort"
  58. android:layout_width="wrap_content"
  59. android:layout_height="wrap_content"
  60. android:layout_gravity="center"
  61. android:ellipsize="end"
  62. android:singleLine="true"
  63. android:textAppearance="@android:style/TextAppearance.Medium"
  64. android:textColor="@android:color/black"
  65. tools:text="Test long. ANd when I say long I mean really really long" />
  66.  
  67. <TextView
  68. android:id="@+id/hugleft"
  69. android:layout_width="0dp"
  70. android:layout_height="wrap_content"
  71. android:layout_weight="1"
  72. android:gravity="left"
  73. android:paddingLeft="4dp"
  74. tools:text="25" />
  75.  
  76. <TextView
  77. android:id="@+id/endText"
  78. android:layout_width="wrap_content"
  79. android:layout_height="wrap_content"
  80. android:layout_gravity="center"
  81. android:text="END"
  82. android:visibility="visible" />
  83. </LinearLayout>
  84.  
  85. I get:
  86. [Test long. ANd when I say ...][END]
  87. desired:
  88. [Test long. ANd when I ...][25][END]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement