// Copyright (c) 2013 Kazumasa Kohtaka. All rights reserved.
// This file is available under the MIT license.

package org.kohtaka.app.mdview;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class MainActivity extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    String markdown = "# TITLE\n## SECTION\n* ITEM1\n* ITEM2\n* ITEM3";
    String html = DiscountBinding.convertMarkdownToHtml(markdown);
    if (html.length() > 0) {
      WebView webView = (WebView)findViewById(R.id.webview);
      webView.loadData(html, "text/html; charset=UTF-8", null);
    }
  }
}


@@ -222,16 +222,53 @@
 WebView;
+%0Aimport android.webkit.WebViewClient;
 %0A%0Apublic
@@ -675,16 +675,220 @@
 bview);%0A
+      // Disable clicking links%0A      webView.setWebViewClient(new WebViewClient() %7B%0A        public boolean shouldOverrideUrlLoading(WebView view, String url) %7B%0A          return true;%0A        %7D%0A      %7D);%0A
       we

disable clicking links