欢迎大家讨论,这个话题很有趣!

解决方案 »

  1.   

    这个不清楚,估计又涉及到底层了。
    越来越觉得google对开发者限制太多了,而且api文档做的也不好。
    在apiDoc中,想搜索个方法名 都没这个功能。
      

  2.   

    涉及到底层,不过DDMS可以截图或者使用一个软件 APK安装器,下载地址 http://www.crsky.com/soft/16759.html
      

  3.   

    估计手机上没有root权限不可以吧
      

  4.   

    经常有xml node文档查不到 如layer-list clip
    很多函数文档上啥也没有 如Surface.freeze
    也有可能是为了照顾低性能系统 framework跟sun和ms的没法比
    没有开放C接口 搞的大家都是看源码猜  且c层代码经常大规模改动
      

  5.   

    也在研究这个问题,就Google到这里来了……不知道OpenGL ES有没有这方面的接口。
      

  6.   

    直接用命令行即可。不过需要root
      

  7.   

    已经有这样的APK可以下载了,我用过,这个APK自带了一个su,复制到/system/xbin下面,覆盖掉之前那个,并修改权限4755就可以用了,很方便。
      

  8.   

    直接取framebuffer(有一个路径)中的内容应该就可以了。
      

  9.   

    源码里面有对应的实现,可以看看adb tool的源码。
      

  10.   

    android 里很少有机型是支持截图软件的说是为了保护用户隐私,纠结死
      

  11.   

            public void onCreate(Bundle savedInstanceState){
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
                currentView = findViewById(R.id.screen);
                clickBtn = findViewById(R.id.click_button);
                clickBtn.setOnClickListener(this);
            }        public void onClick(View v){
                View screen = currentView.getRootView();
                System.out.println("Root view");
                screen.setDrawingCacheEnabled(true);
                Bitmap shot = screen.getDrawingCache();
                if(shot != null)
                    System.out.println("shot is not null");            FileOutputStream fos = null;
                try {
                    fos = new FileOutputStream(pathname);
                    if(fos != null){
                        shot.compress(Bitmap.CompressFormat.PNG, 100, fos);
                        fos.flush();
                        fos.close();
                    }
                }catch (FileNotFoundException e){
                    e.printStatckTrace();
                }catch (IOException e){
                    e.printStatckTrace();
                }
            }
      

  12.   

    楼上,这个只能对view管用,但是对整个window的话,就无解~~