Superscript/subscript
Posted: Thu Feb 02, 2012 7:47 pm
I'm needing to show the chart title as a string containing superscripts and/or subscripts.
I'm able to set any typical Android EditText value as:
EditText myEditText=new EditText(this);
String with="x<sub>3</sub>";
myEditText.setText(Html.fromHtml(with));
..and the editText correctly displays x with a subscript of 3.
However
chart.getHeader().setText(Html.fromHtml(with));
will not compile.
Is there some means of using the fromHtml function (Spanned CharSequence) to display the chart title?
I'm able to set any typical Android EditText value as:
EditText myEditText=new EditText(this);
String with="x<sub>3</sub>";
myEditText.setText(Html.fromHtml(with));
..and the editText correctly displays x with a subscript of 3.
However
chart.getHeader().setText(Html.fromHtml(with));
will not compile.
Is there some means of using the fromHtml function (Spanned CharSequence) to display the chart title?