parent
b400ecc437
commit
77cecbfaef
@ -0,0 +1,22 @@
|
||||
package net.micode.notes.ui.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.zzhoujay.richtext.RichText;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
public class PreviewActivity extends Activity {
|
||||
|
||||
public static String text;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
RichText.initCacheDir(this.getCacheDir());
|
||||
this.setContentView(R.layout.preview_layout);
|
||||
TextView mdView = (TextView) this.findViewById(R.id.md_view);
|
||||
RichText.fromMarkdown(text).into(mdView);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/md_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in new issue