How can I display Latin words in Android?

后端 未结 2 1969
时光说笑
时光说笑 2020-12-12 07:04

I am a new Android developer. I\'m working with a Latin font in my app but I can\'t get it to work and keep getting a ? for the character. My code is below, usi

2条回答
  •  忘掉有多难
    2020-12-12 07:32

    I don't know what you have done in code and why used HTML ? but I can assume you need this simple code. please see below modified method.

    private void displayTestQuestion() {
        resetEverything();
        stats.setText(Integer.toString(totalRightQuestions)+"/"+Integer.toString(totalNumberOfQuestions));
    
        String questionText = questionCursor.getString(0);
        Typeface font = Typeface.createFromAsset(getContext().getAssets(), "fonts/LATINWD.TTF");
        question.setTypeface(font);
        question.setText(questionText);
        adjectiveNumber = questionCursor.getString(1);
        adjectiveCase = questionCursor.getString(3);
        adjectiveGender = questionCursor.getString(2);
    }
    

提交回复
热议问题