• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to add thumbnails to viewpager

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a viewpager with several fragments.I need to add thumbnail view to it.How to add this ?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What particular difficulty are you facing? The layout needs to have a View that can display the thumbnail (probably an image), you somehow need to generate the thumbnail, and then set it when the fragment is created. Break the task down into simpler steps, and tackle them one by one, like you would for any feature.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually i need to add special behaviors to that thumbs.When the user click it needs to come up and when user click again it should hide.How to add a thumbs with this features.I can add a thumbs as a Horizontal Scroll viewer,but how to add this hide behavior?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any View can be hidden or removed from a layout; check the View javadocs for the details of the respective method calls. This can happen from within the onClick handler of a button, for example.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually ulf i know view can hide via xml layout,but the thing is that when i hidden the scroll bar how to handle the space of the that view earlier taken
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then remove it from the view.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic