3

I am having a small issue with capturing screen in android. I am using a list view which has few items. When the items are fitting the screen there is no issue to capture the screen. But when there is a scroll view for the list items (that is there are more number of items in the listview so that it cant be fitted in the screen) i am not able to capture the screen. The capture of the screen gives me only the visible items of the list view and the invisible items are not being captured.

I am using the link to capture the screen. can anyone suggest me if there is anyway to capture the listview screen.

My screen has all alphabets from a-z but when i tried to capture using here i got only the below screen shot.

enter image description here

Community
  • 1
  • 1
G_S
  • 7,068
  • 2
  • 21
  • 51

2 Answers2

1

This is related to this question/answer here. Basically you need to render your view to a canvas that is backed by a bitmap. This bitmap now contains your entire view.

Community
  • 1
  • 1
  • no the links didnt help me.Can you provide a little bit more information please. i am editing my question with a screenshot i obtained – G_S Sep 24 '12 at 18:34
  • Maybe if you describe why the link didn't help you, I can help you. Because the method I provided you is sound. – Stephan van den Heuvel Sep 24 '12 at 18:40
  • yes sure. I used the three methods given in the link by passing the listview object as parameter (that is view) but when i tried capturing it i just got the capture as in the question instead of the entire listview – G_S Sep 24 '12 at 18:42
  • Unless I'm missing something, screen capture just captures the image of the screen. What you see is what you get. Try using the ListView functions to check what's visible and page the list accordingly. Take a screen shot of each screen after scrolling the missed data. – Howard Hodson Sep 24 '12 at 22:48
  • capturing the screen after every scroll? Yes this is a good idea but i need a whole image of the listview. if i am using this capturing the screen after every scroll i may get duplicated data. – G_S Sep 25 '12 at 03:10
0

We need to capture the listview by capturing each and every listitem in the listview. after capturing each and every item in the listview we need to add all the captured list items and make a bitmap image. This way we can capture an listview even if all its items are not visible

G_S
  • 7,068
  • 2
  • 21
  • 51