Take screenshot with dialog

前端 未结 5 1489
既然无缘
既然无缘 2021-01-02 03:59

I need to take screenshot programmatically of activity view. I have found a lot of answers how to do it, but there is not answer how to do it with opened dialog

5条回答
  •  -上瘾入骨i
    2021-01-02 04:24

    Use the "screen capture" button in the "Devices" window of DDMS with a device/emulator connected. This allows you to take screenshots of whatever is on screen, including when a dialog is open.

    enter image description here

    EDIT: when I answered this question, it was not clear it needed to be done programmatically and was later edited to clarify.

提交回复
热议问题