1

I am trying to find a way to take a screenshot of a given XML file and generate a screenshot of it using the command line. I know there are ways to get a screenshot from Android app, as well as from IDE. I am trying to find a way to do the same from CLI.

Have been trying to read everywhere, but haven't found a way yet.

Amit
  • 3,952
  • 7
  • 46
  • 80
  • What has an xml file to do with a screen? Nothing as far as i know. So which screen do you want to shoot? – greenapps Feb 08 '15 at 11:24
  • @greenapps I want to replicate the functionality from the layout preview, such that given an xml, I get a screenshot. – Amit Feb 08 '15 at 11:32
  • O a layout definition file. So you want to take a screenshot of a gui layout constructed from an xml file. Why not say so? And who/what is displaying a layout preview? – greenapps Feb 08 '15 at 11:42
  • @greenapps a browser. – Amit Feb 08 '15 at 13:18
  • So NOT a layout definition file! Just any xml file. In a browser ? And why did you say 'fom Android app'? And what didn't you tell more? – greenapps Feb 08 '15 at 13:25
  • @greenapps let me share an example: http://pastebin.com/BDmcfsGW and for getting screenshot from android i mean http://stackoverflow.com/a/9596132/409110. What I need is a way to do all this directly by running a command in bash. I do not want to have an android app. – Amit Feb 08 '15 at 14:04
  • Nothing makes sense the way you post your problem. What has taking a screenshot of a view to to with the browser you mentioned? And what has a view to do with an xml file? – greenapps Feb 09 '15 at 17:06
  • @greenapps An android view layout is an XML file. A screenshot is an image which is going to be displayed in the browser. I need a CLI tool to which I'll give the layout XML and the output of that command will be an image that I can show in the browser. – Amit Feb 09 '15 at 20:42
  • You post your knowledge in a terrible way. Glad you are not my teacher... – greenapps Feb 10 '15 at 08:49

0 Answers0