Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 0.90 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. edit div tag in a webview
  2. public class WebAppStackOverFlowActivity extends Activity {
  3.     public void onCreate(Bundle savedInstanceState) {
  4.         super.onCreate(savedInstanceState);
  5.         setContentView(R.layout.main);
  6.  
  7.         WebView webView = (WebView) findViewById(R.id.webView) ;
  8.         webView.setWebChromeClient (new WebChromeClient()) ;
  9.         webView.loadUrl("file:///android_asset/www/index.html") ;
  10.     }
  11. }
  12.        
  13. <!DOCTYPE html>
  14. <html>
  15. <head>
  16. </head>
  17. <body>
  18.     <input id="name" value="this is an input tag" />
  19.     <br />
  20.     <div contenteditable="true">this is an editable div tag</div>
  21.     <br />
  22.     <textarea rows="" cols="">this is a textarea tag</textarea>
  23. </body>
  24. </html>
  25.        
  26. <?xml version="1.0" encoding="utf-8"?>
  27. <WebView xmlns:android="http://schemas.android.com/apk/res/android"
  28.     android:id="@+id/webView"
  29.     android:layout_width="fill_parent"
  30.     android:layout_height="fill_parent" />