Search code examples
androidandroid-listviewhint

Hide a part of listview and show after to click


I would like a hint about listView. What is the best way to show a part of one listview. Summing up,I want to fill a listview with a title and a long text, but i do not want to show all text, just a part. However, i want to see all the textlong in a window, when a click on the item.

Title 1

textlongtextlong

textlongtextlong

textlongtextlong

textlongtextl...

Title 2

textlongtextlong

textlongtextlong

textlongtextlong ...


Solution

  • U can play with ellipsize and singleline attributes of textview. So when first show (before click) set the ellipsize end and Singleline = true. Then after click one of the text field u can set the ellipsize to false and also the singleline. Hopely it can give an idea to accomplish your probs.