I'm trying to get formatted text and special characters from the strings.xml. I don't have any problem either getting formatted text (bold, superscript, subscript, etc) or getting some greek characters (beta, eta), even chinese characters. But what I'm not able to retrieve is the greek character "capital phi" (HTML-code: ϕ). Does anyone know how to do it?
Here's the code I'm using.
strings.xml
<resources>
<string name="beta">β</string>
<string name="eta">η</string>
<string name="phi">ϕ</string>
<string name="zhongwen">为什么呀!</string>
<string name="area"><b>A</b><sub><small>s,t</small></sub> [cm<sup><small>2</small></sup>]</string>
</resources>
MainActivity.java
public class MainActivity extends ActionBarActivity {
TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = (TextView)findViewById(R.id.text_view);
textView.setTextSize(50);
textView.setGravity(Gravity.CENTER);
textView.setText(getText(R.string.beta));
textView.append(getText(R.string.eta));
textView.append(getText(R.string.phi));
textView.append(getText(R.string.zhongwen));
textView.append(getText(R.string.area));
}
}