package Ġcom . qu ill . android . span nable . sample Ċ Ċ import Ġandroid . support . v 7 . app . AppCompatActivity Ċ import Ġandroid . os . Bundle Ċ import Ġcom . qu ill . android . delta . Delta Ċ import Ġcom . qu ill . android . span nable . Converter Delta To Sp anned Ċ import Ġkotlinx . android . synt hetic . main . activity _ main .* Ċ Ċ class ĠMainActivity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġsample Json Ġ= Ġ"{\" ops \": [{ \" insert \":\" normal Ġ\ "}, {\" attributes \":{\" bold \": true }, \" insert \":\" bold \" },{ \" insert \":\" Ġ\ "}, {\" attributes \":{\" italic \": true }, \" insert \":\" italic \" },{ \" attributes \":{\" underline \": true ,\" italic \": true }, \" insert \":\" underline \" },{ \" attributes \":{\" underline \": true ,\" strike \": true ,\" italic \": true }, \" insert \":\" strike Ġ Ġ\ "}, {\" attributes \":{\" underline \": true ,\" strike \": true ,\" italic \": true ,\" script \":\" super \" }, \" insert \":\" super \" },{ \" attributes \":{\" underline \": true ,\" strike \": true ,\" italic \": true ,\" script \":\" sub \" }, \" insert \":\" sub Ġ\ "}, {\" attributes \":{\" italic \": true ,\" color \":\" # e 6 0 0 0 0 \",\" bold \": true }, \" insert \":\" color \" },{ \" attributes \":{\" strike \": true ,\" italic \": true ,\" color \":\" # e 6 0 0 0 0 \",\" bold \": true }, \" insert \":\" Ġ\ "}, {\" attributes \":{\" underline \": true ,\" strike \": true ,\" color \":\" # f 0 6 6 6 6 \",\" background \":\" # a 1 0 0 0 0 \",\" italic \": true }, \" insert \":\" background \" },{ \" insert \":\" \\ n \" },{ \" attributes \":{\" underline \": true ,\" strike \": true ,\" italic \": true }, \" insert \":\" header 1 \" },{ \" attributes \":{\" header \": 1 }, \" insert \":\" \\ n \" },{ \" insert \":\" header 2 \" },{ \" attributes \":{\" header \": 2 }, \" insert \":\" \\ n \" },{ \" insert \":\" header Ġ 3 \" },{ \" attributes \":{\" header \": 3 }, \" insert \":\" \\ n \" },{ \" insert \":\" q \" },{ \" attributes \":{\" bold \": true }, \" insert \":\" uo \" },{ \" insert \":\" te \" },{ \" attributes \":{\" blockquote \": true }, \" insert \":\" \\ n \" },{ \" insert \":\" code \" },{ \" attributes \":{\" code - block \": true }, \" insert \":\" \\ n \" },{ \" insert \":\" indent \" },{ \" attributes \":{\" indent \": 1 }, \" insert \":\" \\ n \" },{ \" insert \":\" indent 2 \" },{ \" attributes \":{\" indent \": 2 }, \" insert \":\" \\ n \" },{ \" insert \":\" indent 3 \" },{ \" attributes \":{\" indent \": 3 }, \" insert \":\" \\ n \" },{ \" insert \":\" indent 2 \" },{ \" attributes \":{\" indent \": 2 }, \" insert \":\" \\ n \" },{ \" attributes \":{\" link \":\" http :// ww www . link ww ww \" }, \" insert \":\" link \" },{ \" insert \":\" \\ n \" }] }" ĊĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ main ) ĊĊĠĠĠĠĠĠĠ Ġval Ġconverter Ġ Ġ= ĠConverter Delta To Sp anned () ĊĠĠĠĠĠĠĠ Ġtext . text Ġ= Ġconverter . convert ( Delta ( sample Json )) ĊĠĠĠ Ġ} Ċ } Ċ