Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8859111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:58:38+00:00 2026-06-14T14:58:38+00:00

I am a new Android developer. I’m working with a Latin font in my

  • 0

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, using an sqlite database.I have to fetch text from an Sqlite database and every special Latin character (i.e. à, ò, ù, è…) was displayed with black squares with a “?” inside.

How can i display this correctly?

private void displayTestQuestion() {
    resetEverything();
    stats.setText(Integer.toString(totalRightQuestions)+"/"+Integer.toString(totalNumberOfQuestions));

    String questionText = questionCursor.getString(0);
    question.setText(Html.fromHtml(questionText));
    adjectiveNumber = questionCursor.getString(1);
    adjectiveCase = questionCursor.getString(3);
    adjectiveGender = questionCursor.getString(2);
}

My emulator screen:

enter image description here

I’ve also tried this code:

private void displayTestQuestion() {
    resetEverything();
    stats.setText(Integer.toString(totalRightQuestions)+"/"+Integer.toString(totalNumberOfQuestions));

    String questionText = questionCursor.getString(0);
    Typeface font = Typeface.createFromAsset(questionCursor.getString(0), "fonts/LATINWD.TTF");
    //question.setText(Html.fromHtml(questionText));
    question.setText((CharSequence) font);
    adjectiveNumber = questionCursor.getString(1);
    adjectiveCase = questionCursor.getString(3);
    adjectiveGender = questionCursor.getString(2);
}

But this is giving me the following error:

The method createFromAsset(AssetManager, String) in the type Typeface is not applicable for the arguments (String, String).

And i used Sqlitehelper class my code is below:

public class VocabTesterDatabaseHelper extends SQLiteOpenHelper {

    private static String DB_PATH = "data/data/com.VoacabTester/databases/";

    private static String DB_NAME = "vocabdb.db";

    private SQLiteDatabase vocabDatabase;

    private final Context vocabContext;

    public VocabTesterDatabaseHelper(Context context) {
        super(context, DB_NAME, null, 3);
        this.vocabContext = context;
    }

    public void createDataBase() throws IOException {

        boolean dbExist = checkDataBase();

        if (dbExist) {

        } else {
            this.getReadableDatabase();
            copyDataBase();
        }

    }

    private boolean checkDataBase() {

        File dbFile = new File(DB_PATH + DB_NAME);
        return dbFile.exists();
    }

    private void copyDataBase() throws IOException {
        try {

            InputStream myInput = vocabContext.getAssets().open(DB_NAME);
            String outFileName = DB_PATH + DB_NAME;

            // Open the empty db as the output stream
            OutputStream myOutput = new FileOutputStream(outFileName);

            byte[] buffer = new byte[1024];
            int length;
            while ((length = myInput.read(buffer)) > 0) {
                myOutput.write(buffer, 0, length);
            }
            myOutput.flush();
            myOutput.close();
            myInput.close();
        } catch (IOException e) {
            Log.v("data", e.toString().concat("sql"));
        }
    }

    public void openDataBase() throws SQLException {

        // Open the database
        String myPath = DB_PATH + DB_NAME;
        vocabDatabase = SQLiteDatabase.openDatabase(myPath, null,
                SQLiteDatabase.OPEN_READONLY);

    }

    public Cursor getFoundationTierQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM FoundationTierVocabularyQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    };

    public Cursor getHigherTierQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM HigherTierQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getEasyFirstConjugationVerbs() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM VerbQuestions1stConjugation ORDER BY Random()",
                null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getEasySecondConjugationVerbs() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM VerbQuestions2ndConjugation ORDER BY Random()",
                null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getEasyThirdConjugationVerbs() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM VerbQuestions3rdConjugation ORDER BY Random()",
                null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getEasyFourthConjugationVerbs() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM VerbQuestions4thConjugation ORDER BY Random()",
                null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getEasyMixConjugationVerbs() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM VerbQuestionsallConjugation ORDER BY Random()",
                null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getEasyIrregularConjugationVerbs() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM IrregularVerbsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getFirstDeclensionNounsQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM FirstDeclensionNounsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getSecondDeclensionNounsQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM SecondDeclensionNounsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getThirdDeclensionNounsQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM ThirdDeclensionNounsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getFourthDeclensionNounsQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM FourthDeclensionNounsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getFifthDeclensionNounsQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM FifthDeclensionNounsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getNounsAllDeclensionNounsQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM NounsDeclensionNounsQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getis_ea_idQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IsEaIdQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor gethic_haec_hocQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM HicHaecHocQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getille_illa_illudQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IlleIllaIlludQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getqui_quae_quodQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM QuiQuaeQuodQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getIdem_eadem_idemQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IdemEademIdemQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getipse_ipsa_ipsumQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IpseIpsaIpsumQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getalius_alia_aliudQuestions() {
        Cursor cur;
        cur = vocabDatabase
                .rawQuery(
                        "SELECT * FROM AliusAliaAliudQuestions ORDER BY Random()",
                        null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAdjectiveQuestions() {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM AdjectivesQuestions ORDER BY Random()", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerFirstDeclensionNounsQuestion(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM FirstDeclensionNounsQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getSAnswerecondDeclensionNounsQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM SecondDeclensionNounsQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerThirdDeclensionNounsQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM ThirdDeclensionNounsQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerFourthDeclensionNounsQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM FourthDeclensionNounsQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerFifthDeclensionNounsQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM FifthDeclensionNounsQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerNounsAllDeclensionNounsQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM NounsDeclensionNounsQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnsweris_ea_idQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IsEaIdQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerhic_haec_hocQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM HicHaecHocQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerille_illa_illudQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IlleIllaIlludQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerqui_quae_quodQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM QuiQuaeQuodQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerIdem_eadem_idemQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IdemEademIdemQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnsweripse_ipsa_ipsumQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM IpseIpsaIpsumQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnsweralius_alia_aliudQuestions(String question) {
        Cursor cur;
        cur = vocabDatabase.rawQuery(
                "SELECT * FROM AliusAliaAliudQuestions WHERE Question LIKE '"
                        + question + "'", null);
        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    public Cursor getAnswerAdjectiveQuestions(String question) {
        Cursor cur;

        cur = vocabDatabase.rawQuery(
                "SELECT * FROM AdjectivesQuestions WHERE Question LIKE '"
                        + question + "'", null);

        cur.moveToFirst();
        vocabDatabase.close();
        return cur;
    }

    @Override
    public synchronized void close() {

        if (vocabDatabase != null)
            vocabDatabase.close();

        super.close();

    }

    @Override
    public void onCreate(SQLiteDatabase db) {

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:58:40+00:00Added an answer on June 14, 2026 at 2:58 pm

    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);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a new android app developer and i want to use google map
I am new android app developer i want make app for tablets and phone
I am a new android developer. Currently I am working on an application which
hi i am a new android developer. In my app i have created a
The new Android in-app billing (http://developer.android.com/guide/market/billing/billing_testing.html) page says: To test in-app billing in an
hi i am new android developer.i want to show image in viewFlipper.But it is
I am a relatively new Android developer but have gotten pretty familiar with the
I'm a new android developer. I'm developing an app for android Gingerbread (2.3.3) and
I Am a New Android Developer, I know Handle The Back Button but I
I am relatively a new Android developer and I am not able to understand

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.