0

My plan is to pass a picture or an ImageView and some text or a TextView from one fragment to another, where it will be displayed. The formatting needed to accomplish this goal would require the two Views to be placed above any existing View objects in the receiving fragment rather than below them. An example of what I am trying to accomplish would be how any new post made on Instagram is placed at the top of the feed rather than the bottom, as it would be if I were to simply add a new ImageView and TextView object to the activity_layout.xml file.

I need to know how to pass either the two Views or their contents to a second fragment and arrange its formatting to display the most recently added Views at the top of the screen. I already have the code to switch between fragments.

Does anybody have any suggestions on how to accomplish this?

McFizz
  • 3,013
  • 3
  • 18
  • 26
  • the phrase "NEW" would suggest newer based on record-ID (integer) or perhaps time-stamp... am i getting the idea or i misinterpret your idea ? – Chim Ly Jan 16 '16 at 20:24
  • I'm not entirely sure what you mean (I'm still new to the Android SDK) but basically: the second `fragment` will have no `View` objects until the first passes one to it, if that's possible. Organizing the `Views` by time stamp from newest to oldest is basically what I am trying to do. Does that help? – McFizz Jan 16 '16 at 20:29
  • there was a similar thread i read sometime ago, updated answer for you. hope this help. – Chim Ly Jan 16 '16 at 20:37

0 Answers0