-4

Like this: I am working with list view in android having short messages in it,When I click an item from the list vieW a new activity is started which shows the full description of the message along with additional information.However I want to achieve something like the following image,that when some message from the list view is clicked,then the message will be displayed as in the image rather than starting a new activity.Is there any predefined component there ?If not then how can I achieve it? I don't know how to show the full message on the same screen in a listview


enter image description here.

nobalG
  • 4,544
  • 3
  • 34
  • 72
  • I believe that's called an *ExpandableListView* or sometimes an *Accordion*. – jww Oct 06 '14 at 04:57
  • @jww **My full message(as shown in the image) may consist of a complete email message**,,,then will your expandable listview will work there too....? – nobalG Oct 06 '14 at 05:19
  • Thanks for posting a question with example snap but unfortunately this question has been asked many time. You need to look for **ExpandableListView**. – Paresh Mayani Oct 06 '14 at 05:27

1 Answers1

2

Take a look at ExpandableListView. Tutorial links can be found in this SO post.

Community
  • 1
  • 1
gosr
  • 4,593
  • 9
  • 46
  • 82
  • You could also use [Fragments](http://developer.android.com/guide/components/fragments.html) – Abbath Oct 06 '14 at 04:55
  • 2
    @eightx2 - why did you *not* move to close this question as a duplicate? – jww Oct 06 '14 at 04:59
  • I guess my requirement is the fragment thing as @Abbath is suggesting – nobalG Oct 06 '14 at 05:04
  • @jww My full message(as shown in the image) may consist of a complete email message,,,then will your expandable listview will work there too....? – nobalG Oct 06 '14 at 05:05