Android Open Source - MarkdownView Markdown Data Activity






From Project

Back to project page MarkdownView.

License

The source code is released under:

Apache License

If you think the Android project MarkdownView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package us.feras.mdv.demo;
//from   w ww . j  av  a  2s  .co m
import us.feras.mdv.MarkdownView;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MarkdownDataActivity extends Activity {

  private EditText markdownEditText;
  private MarkdownView markdownView;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.markdown_view);
    markdownEditText = (EditText) findViewById(R.id.markdownText);
    markdownView = (MarkdownView) findViewById(R.id.markdownView);
    String text = getResources().getString(R.string.md_sample_data);
    markdownEditText.setText(text);
    updateMarkdownView();

    Button updateView = (Button) findViewById(R.id.updateButton);
    updateView.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        updateMarkdownView();
      }
    });

  }

  private void updateMarkdownView() {
    markdownView.loadMarkdown(markdownEditText.getText().toString());
  }
}




Java Source Code List

com.petebevin.markdown.CharacterProtector.java
com.petebevin.markdown.HTMLDecoder.java
com.petebevin.markdown.HTMLToken.java
com.petebevin.markdown.LinkDefinition.java
com.petebevin.markdown.MarkdownProcessor.java
com.petebevin.markdown.Replacement.java
com.petebevin.markdown.TextEditor.java
us.feras.mdv.MarkdownView.java
us.feras.mdv.demo.LocalMarkdownActivity.java
us.feras.mdv.demo.MainActivity.java
us.feras.mdv.demo.MarkdownDataActivity.java
us.feras.mdv.demo.MarkdownThemesActivity.java
us.feras.mdv.demo.OnlineMarkdownActivity.java
us.feras.mdv.util.HttpHelper.java