0

I want to know how can I use unicode chars like arabic or persian in option menu? I acctually use this class to reshape string value and set those value as text of my objects like button, text view and ... but I dont know how can I set those value as option menu text

way that I reshape char:

public void setface() {
    // TODO Auto-generated method stub

    Typeface face = Typeface.createFromAsset(getAssets(), "font/"+fonts+"");

    TextView shoma = (TextView) findViewById(R.id.shoma);
    shoma.setTypeface(face);
    String shoma_txt = shoma.getText().toString();
    shoma.setText(PersianReshape.reshape(shoma_txt));
}

face is a function in reshaper.java (because it's too long I could not post it here)

now how can I use this method to set option menu tittle (or Toast text)?

4

1 回答 1

0

我不知道我是否理解你的问题。你想改变字体类型吗?要在 Toast 通知中实现这一点,您可以创建自定义 Toast 视图。请参阅:http: //developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView

于 2012-04-26T16:28:37.163 回答