当前位置: 动力学知识库 > 问答 > 编程问答 >

Android:How to create Document Editor with .doc , .ppt, .xls, .pdf format?

问题描述:

I want to create an editor, in which i can edit the document while reading it.

Can anyone suggest how to start off with this project?

网友答案:

Hi How can you edit PDF file.

you can view the pdf and HTML pages on the Mobile by using the following code.

You have to create web inside the lay out folder and Inside the activity write below code :

 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");   
分享给朋友:
您可能感兴趣的文章:
随机阅读: