【问题标题】:Android:How to create Document Editor with .doc , .ppt, .xls, .pdf format? [closed]Android:如何创建 .doc、.ppt、.xls、.pdf 格式的文档编辑器? [关闭]
【发布时间】:2012-03-10 13:24:58
【问题描述】:

我想创建一个编辑器,在其中我可以在阅读文档时对其进行编辑。 谁能建议如何开始这个项目?

【问题讨论】:

    标签: android pdf document


    【解决方案1】:

    嗨,您如何编辑 PDF 文件。

    您可以使用以下代码在手机上查看pdf和HTML页面。

    您必须在布局文件夹中创建网页,并在活动中编写以下代码:

     private WebView myWebView;
     myWebView = (WebView) this.findViewById(R.id.webView);  
        private static final FrameLayout.LayoutParams ZOOM_PARAMS =  new FrameLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT,Gravity.BOTTOM); 
            FrameLayout mContentView = (FrameLayout) getWindow().      
           getDecorView().findViewById(android.R.id.content);         
           final View zoom = this.myWebView.getZoomControls();        
           mContentView.addView(zoom, ZOOM_PARAMS);                   
           zoom.setVisibility(View.GONE);
          String url = "http://marico.com/html/index.html";
           String googleDocsUrl = "http://docs.google.com/viewer?url="+url;
           Intent intent = new Intent(Intent.ACTION_VIEW);
           intent.setDataAndType(Uri.parse(googleDocsUrl ), "text/html");
           startActivity(intent);
    
           this.myWebView.loadUrl("http://marico.com/html/index.html");   
    

    【讨论】:

      猜你喜欢
      • 2011-06-18
      • 2014-09-25
      • 1970-01-01
      • 1970-01-01
      • 2012-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多